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 wrap: on
line diff
--- a/s4-blog.sh	Wed Aug 30 08:47:01 2017 +0859
+++ b/s4-blog.sh	Thu Sep 07 08:27:37 2017 +0859
@@ -35,10 +35,11 @@
   blogurl="$urlbase?replyblog+$blogid"
   action=${4:-書き込み}
   mode=`getvalbyid blog notify "$blogid"`
+  isgroup "$blogowner" && _isgroup=true || _isgroup=false
   ### EXCEPT=`sqlquote "$user"`	## User should receive to feal some annoyance
   case $mode in
     admin)
-      if isgroup "$blogowner"; then
+      if $_isgroup; then
 	emails=`getgroupadminmails $blogowner`
       else
 	emails=`collectemail $blogowner`
@@ -68,7 +69,14 @@
 	WHERE rowid in ($ids)\
 	AND blogid=(SELECT id FROM blog WHERE rowid=$blogid);"`
     if [ -n "$unames" ]; then
-      emails=$emails" `email4group \"$blogowner\" $unames`"
+      e4g=$(if $_isgroup; then
+	      email4group "$blogowner" $unames
+	    else
+	      for u in $unames; do
+		collectemail $u
+	      done
+	    fi)
+      emails=$emails" $e4g"
       for e in $unames; do
 	g=`gecos $e`
 	whom=$whom"${whom:+,}${g:-$e}さん"

yatex.org