Mercurial > hgrepos > hgweb.cgi > s4
changeset 566:2d1d651aa1f2
$DT_SQL handling fixed
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 18 Apr 2019 08:17:24 +0900 |
parents | b87e1cbf3491 |
children | 5b911fee7e1b |
files | s4-funcs.sh |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Thu Apr 18 07:24:19 2019 +0900 +++ b/s4-funcs.sh Thu Apr 18 08:17:24 2019 +0900 @@ -3149,7 +3149,8 @@ CREATE TEMPORARY TABLE _target AS SELECT b.rowid trowid, b.id FROM "$2" b JOIN "$2_s" s - ON b.id=s.id AND s.key='owner' AND s.val=$DT_QOWNER; + ON b.id=s.id AND s.key='owner' + ${DT_QOWNER:+ AND s.val=$DT_QOWNER}; CREATE TEMPORARY TABLE _children AS SELECT a.trowid trowid, $_i, a.id, s.val ctime @@ -3211,7 +3212,7 @@ scols="$scols${scols:+, }b.$as" done #case author when '$user' then a.rowid else '---' end as ID, - if [ -z "DT_SQL" ]; then + if [ -n "$DT_SQL" ]; then echo "$DT_SQL" else cat<<-EOF