# HG changeset patch # User HIROSE Yuuji # Date 1480302439 -32399 # Node ID 606404fbb3d3adc68c934ba30453751fcb9ae043 # Parent cc2a6f6315538f11e6030f0dae7ef4c40ec40718 Sort group list by posting time(wtime) diff -r cc2a6f631553 -r 606404fbb3d3 s4-blog.sh --- a/s4-blog.sh Mon Nov 28 11:05:32 2016 +0859 +++ b/s4-blog.sh Mon Nov 28 12:07:18 2016 +0859 @@ -798,7 +798,12 @@ case $st in 0|4) [ "$st" = "4" ] && act="書込削除" - blog_notify_reply $rowid $user "$text" $act ;; + blog_notify_reply $rowid $user "$text" $act + if [ -n "$grprowid" ]; then + qgrp=$(sqlquote "$owner") + dbsetbyid grp $owner wtime "`date '+%F %T'`" + fi + ;; esac else title="$title(加入してないので書き込み不可)" diff -r cc2a6f631553 -r 606404fbb3d3 s4-funcs.sh --- a/s4-funcs.sh Mon Nov 28 11:05:32 2016 +0859 +++ b/s4-funcs.sh Mon Nov 28 12:07:18 2016 +0859 @@ -934,6 +934,7 @@ # $1=tbl $2=id $3=col $4=val/filename - &optional - $5=content-type (t0=$1 t=$1 p=$2 c=$3 tsc=$t/$c val=$4 + quotedp=$(sqlquotestr "$p") unset primary update gettblconf #err tsc=$tsc, tconfs="$tconfs" @@ -947,7 +948,7 @@ s*) t=${t}_s;; esac #err t=$t - type=text fn="" + type=string fn="" case $conf in */password) type=encoded ### val=`echo $val|encode` @@ -965,12 +966,9 @@ ###sq $db "replace into $t values(\"$val\"$nulls)" query "replace into $t values(\"$val\"$nulls);" elif [ "$update" ]; then - ###sq $db "update $1 set $c=\"$val\" where $pkey=\"$p\"" - query "update $1 set $c=\"$val\" where $pkey=\"$p\";" + query "update $1 set $c=\"$val\" where $pkey=$quotedp;" else -#err "replace into $t values(\"$p\", \"$c\", \"$type\", \"$val\", \"$bin\")" - ###sq $db "replace into $t values(\"$p\", \"$c\", \"$type\", \"$val\", \"$bin\")" - query "replace into $t values(\"$p\", \"$c\", \"$type\", \"$val\", \"$bin\");" + query "replace into $t values($quotedp, \"$c\", \"$type\", \"$val\", \"$bin\");" fi ) }