comparison s4-blog.sh @ 1042:99ba706d5fdb draft

Update ctime on (un)set frozen on blog
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 02 May 2024 10:23:10 +0900
parents 78e904f9be34
children 9279d6901c77
comparison
equal deleted inserted replaced
1041:8682149ed229 1042:99ba706d5fdb
580 # If other process have created cache, give up to serve our file 580 # If other process have created cache, give up to serve our file
581 rm -f $cachefile.$$ 581 rm -f $cachefile.$$
582 else 582 else
583 mv -f $cachefile.$$ $cachefile 583 mv -f $cachefile.$$ $cachefile
584 fi 584 fi
585 test -n "$stampfile" && date "+%F %T" > $stampfile 585 test -n "$stampfile" && curtimestamp > $stampfile
586 fi 586 fi
587 if [ -n "$fa" ]; then 587 if [ -n "$fa" ]; then
588 replhref="s/a href=[^>]*>/a>/" 588 replhref="s/a href=[^>]*>/a>/"
589 else 589 else
590 replhref="" 590 replhref=""
1395 elif ! isgrpowner "$user" "$blogowner"; then 1395 elif ! isgrpowner "$user" "$blogowner"; then
1396 msg="グループ管理者のみの操作です"; code=3 1396 msg="グループ管理者のみの操作です"; code=3
1397 else # With full permission 1397 else # With full permission
1398 blogid=`query "SELECT id FROM blog WHERE rowid=$rid;"` 1398 blogid=`query "SELECT id FROM blog WHERE rowid=$rid;"`
1399 dbsetbyid blog "$blogid" "$2" "$3" 1399 dbsetbyid blog "$blogid" "$2" "$3"
1400 dbsetbyid blog "$blogid" ctime "`curtimestamp`" # Update ctime 2024-05-02
1400 code=0 1401 code=0
1401 fi 1402 fi
1402 # echo "{\"code\": $code, \"message\": \"foo\"}"; exit 1403 # echo "{\"code\": $code, \"message\": \"foo\"}"; exit
1403 newval=`getvalbyid blog "$2" "$1"` 1404 newval=`getvalbyid blog "$2" "$1"`
1404 alert="${msg:+, \"alert\": \"$msg\"}" 1405 alert="${msg:+, \"alert\": \"$msg\"}"
1579 0|4) 1580 0|4)
1580 [ "$st" = "4" ] && act="書込削除" 1581 [ "$st" = "4" ] && act="書込削除"
1581 blog_notify_reply $rowid $user "$text" $act 1582 blog_notify_reply $rowid $user "$text" $act
1582 if [ -n "$grprowid" ]; then 1583 if [ -n "$grprowid" ]; then
1583 qgrp=$(sqlquote "$owner") 1584 qgrp=$(sqlquote "$owner")
1584 dbsetbyid grp "$owner" wtime "`date '+%F %T'`" 1585 dbsetbyid grp "$owner" wtime "`curtimestamp`"
1585 else 1586 else
1586 dbsetbyid user "$user" wtime "`date '+%F %T'`" 1587 dbsetbyid user "$user" wtime "`curtimestamp`"
1587 fi 1588 fi
1588 ;; 1589 ;;
1589 esac 1590 esac
1590 else 1591 else
1591 if $isfrozen; then 1592 if $isfrozen; then

yatex.org