Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 173:31e63d173d38
gecos() uses gecoses table
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 19 Feb 2016 16:16:24 +0859 |
parents | cdade692e17d |
children | fe8a381f9483 |
line wrap: on
line diff
--- a/s4-funcs.sh Fri Feb 19 15:36:51 2016 +0859 +++ b/s4-funcs.sh Fri Feb 19 16:16:24 2016 +0859 @@ -430,17 +430,18 @@ gecos() ( u=`sqlquote ${1:-$user}` #gecos=`query "select val from user_s where name='$u' and key='gecos';"` - sql="select case when (select name from user where name=$u) is not null - then coalesce( - (select val from user_s where name=$u and key='gecos'), - $u) - when (select gname from grp where gname=$u) is not null - then coalesce( - (select val from grp_s where gname=$u and key='gecos'), - $u) - else $u - end;" - query "$sql" + # sql="select case when (select name from user where name=$u) is not null + # then coalesce( + # (select val from user_s where name=$u and key='gecos'), + # $u) + # when (select gname from grp where gname=$u) is not null + # then coalesce( + # (select val from grp_s where gname=$u and key='gecos'), + # $u) + # else $u + # end;" + #query "$sql" + query "select gecos from gecoses where name=$u;" ) setpar() { query "replace into par values('$session', '$1', '$2', \"$3\");"