Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 474:4f9036d35b57
Sort user by last login. Sort group by the latest article time.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 07 Sep 2017 12:11:45 +0859 |
parents | 38bf8d300b12 |
children | c01081811298 |
line wrap: on
line diff
--- a/s4-funcs.sh Thu Sep 07 08:27:37 2017 +0859 +++ b/s4-funcs.sh Thu Sep 07 12:11:45 2017 +0859 @@ -1109,6 +1109,7 @@ if pwcheck "$pswd"; then newsession=`genrandom 50` dbsetbyid user $user skey "$newsession" + dbsetbyid user $user login "`date '+%F %T'`" gencookie "user=$user" "skey=$newsession" return 0 fi @@ -2005,9 +2006,11 @@ max(case key when 'tag' then val end) as tag, max(case key when 'mtime' then val end) as mtime, max(case key when 'wtime' then val end) as wtime + max(case key when 'login' then val end) as login from ${tbl}_s group by $nm) b on a.$nm=b.name $cond $3 - order by b.tag desc, b.wtime desc, b.mtime desc, a.rowid asc" + order by b.wtime desc, b.login desc, + b.mtime desc, b.tag desc, a.rowid asc" # Give precedence to newer maintained groups (2016-09-24) # Note that mtime is stored only in grp_s. ## err LE:sql.1="$sql" @@ -2074,7 +2077,7 @@ iconhref "$dir/$deficon" "$hrb+$lnk" "$gecos" fi elif [ -n "$icon" -a -s "$icon" ]; then - iconhref2 "$icon" "$hrb+$lnk" "$gecos" + iconhref2 "$icon" "$hrb+$lnk" "$gecos<br>$mt" else cond="$nm=$qname" # err imgsrc_cache "$dir/list" ${tbl}_m "$cond" S