Mercurial > hgrepos > hgweb.cgi > s4
changeset 50:13f9b5e5df85
subshellize blog_notify_reply
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 22 Jul 2015 18:24:45 +0900 |
parents | aa94b4c20944 |
children | 0c26f4461d0b |
files | s4-blog.sh |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-blog.sh Wed Jul 22 18:22:39 2015 +0900 +++ b/s4-blog.sh Wed Jul 22 18:24:45 2015 +0900 @@ -11,13 +11,14 @@ blogowner=`getvalbyid blog owner "$1"` [ x"$blogowner" = x"$2" ] || isuser "$blogowner" || ismember "$2" "$blogowner" ) -blog_notify_reply() { +blog_notify_reply() ( # $1=articleid $2=ReplyingUser $3=WrittenText blogowner=`getvalbyid blog owner "$1"` [ x"$2" = x"$blogowner" ] && return # If author=blogowner, unnecessary blogtitle=`getvalbyid blog title "$1"` blogurl="$urlbase?replyblog+$1" - case `getvalbyid blog notify "$1"` in + mode=`getvalbyid blog notify "$1"` + case $mode in admin) if isgroup "$owner"; then qgrp=`sqlquote $owner` @@ -30,7 +31,7 @@ no) return ;; *) emails=`collectemail $blogowner` ;; esac -err notify: emails="[$emails]" + ## err notify: mode=$mode emails="[$emails]" smail "$emails" "書込通知 $urlbase"<<EOF [$blogtitle]板に書き込みがありました。 場所: $blogurl @@ -39,7 +40,7 @@ 内容: `echo "$3"|sed 's/^/> /'` EOF -} +) blog_showentry() { # $1=table $2=rowid if [ -n "$2" ]; then