s4
changeset 473:677597199031
Send notification to '>###' mark on diary as well as on group blog.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 07 Sep 2017 08:27:37 +0859 |
parents | 38bf8d300b12 |
children | 4f9036d35b57 |
files | s4-blog.sh |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/s4-blog.sh Wed Aug 30 08:47:01 2017 +0859 1.2 +++ b/s4-blog.sh Thu Sep 07 08:27:37 2017 +0859 1.3 @@ -35,10 +35,11 @@ 1.4 blogurl="$urlbase?replyblog+$blogid" 1.5 action=${4:-書き込み} 1.6 mode=`getvalbyid blog notify "$blogid"` 1.7 + isgroup "$blogowner" && _isgroup=true || _isgroup=false 1.8 ### EXCEPT=`sqlquote "$user"` ## User should receive to feal some annoyance 1.9 case $mode in 1.10 admin) 1.11 - if isgroup "$blogowner"; then 1.12 + if $_isgroup; then 1.13 emails=`getgroupadminmails $blogowner` 1.14 else 1.15 emails=`collectemail $blogowner` 1.16 @@ -68,7 +69,14 @@ 1.17 WHERE rowid in ($ids)\ 1.18 AND blogid=(SELECT id FROM blog WHERE rowid=$blogid);"` 1.19 if [ -n "$unames" ]; then 1.20 - emails=$emails" `email4group \"$blogowner\" $unames`" 1.21 + e4g=$(if $_isgroup; then 1.22 + email4group "$blogowner" $unames 1.23 + else 1.24 + for u in $unames; do 1.25 + collectemail $u 1.26 + done 1.27 + fi) 1.28 + emails=$emails" $e4g" 1.29 for e in $unames; do 1.30 g=`gecos $e` 1.31 whom=$whom"${whom:+,}${g:-$e}さん"