s4
changeset 173:31e63d173d38
gecos() uses gecoses table
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 19 Feb 2016 16:16:24 +0859 |
parents | e9f9c72bfa48 |
children | fe8a381f9483 |
files | s4-funcs.sh |
diffstat | 1 files changed, 12 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/s4-funcs.sh Fri Feb 19 15:36:51 2016 +0859 1.2 +++ b/s4-funcs.sh Fri Feb 19 16:16:24 2016 +0859 1.3 @@ -430,17 +430,18 @@ 1.4 gecos() ( 1.5 u=`sqlquote ${1:-$user}` 1.6 #gecos=`query "select val from user_s where name='$u' and key='gecos';"` 1.7 - sql="select case when (select name from user where name=$u) is not null 1.8 - then coalesce( 1.9 - (select val from user_s where name=$u and key='gecos'), 1.10 - $u) 1.11 - when (select gname from grp where gname=$u) is not null 1.12 - then coalesce( 1.13 - (select val from grp_s where gname=$u and key='gecos'), 1.14 - $u) 1.15 - else $u 1.16 - end;" 1.17 - query "$sql" 1.18 + # sql="select case when (select name from user where name=$u) is not null 1.19 + # then coalesce( 1.20 + # (select val from user_s where name=$u and key='gecos'), 1.21 + # $u) 1.22 + # when (select gname from grp where gname=$u) is not null 1.23 + # then coalesce( 1.24 + # (select val from grp_s where gname=$u and key='gecos'), 1.25 + # $u) 1.26 + # else $u 1.27 + # end;" 1.28 + #query "$sql" 1.29 + query "select gecos from gecoses where name=$u;" 1.30 ) 1.31 setpar() { 1.32 query "replace into par values('$session', '$1', '$2', \"$3\");"