Mercurial > hgrepos > hgweb.cgi > s4
changeset 220:7d05425e4057
Put information how many members in that group.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 15 Jun 2016 17:34:08 +0859 |
parents | e2dea2f63a69 |
children | acd904062e55 |
files | s4-funcs.sh |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Mon Jun 13 12:28:00 2016 +0859 +++ b/s4-funcs.sh Wed Jun 15 17:34:08 2016 +0859 @@ -1614,8 +1614,15 @@ # grpは呼出し元の動的スコープ変数でよくないな... ##qgrp=`sqlquote $grp` getgrp="(select gname from grp where rowid=${rowid:--1})" - sql="select a.rowid, a.$link, coalesce(b.$gcs, a.$nm) as nick, - coalesce(b.gecos, a.$nm) as name, + sql="select a.rowid, a.$link, + coalesce(b.$gcs, a.$nm) as nick, + coalesce(b.gecos, a.$nm) /* If group, concat (Nusers) */ + || case when a.$nm in (select gname from grp) + then printf('(%d名)', + (select count(user) from grp_mem where gname=a.$nm)) + else '<a.$nm>' + end + as name, b.tag, case when a.$nm in (select user from grp_adm where gname=$getgrp) then '(管理者)'