From 55eea442360b84450c3b7618fafaba3f75885294 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 12 Oct 2008 23:28:26 +0200 Subject: [PATCH] don't send subscriber mails to the editor herself FS#1450 darcs-hash:20081012212826-7ad00-0027ac926fdaa413521704536465bb83938a4366.gz --- inc/common.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/common.php b/inc/common.php index 27b5663b9..73e153947 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1024,7 +1024,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ }elseif($who == 'subscribers'){ if(!$conf['subscribers']) return; //subscribers enabled? if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors - $bcc = subscriber_addresslist($id); + $bcc = subscriber_addresslist($id,false); if(empty($bcc)) return; $to = ''; $text = rawLocale('subscribermail'); @@ -1203,7 +1203,7 @@ function is_subscribed($id,$uid,$ns=false){ * * @author Steven Danz <steven-danz@kc.rr.com> */ -function subscriber_addresslist($id){ +function subscriber_addresslist($id,$self=true){ global $conf; global $auth; @@ -1219,6 +1219,7 @@ function subscriber_addresslist($id){ $mlist = file($file); foreach ($mlist as $who) { $who = rtrim($who); + if(!$self && $who == $_SERVER['REMOTE_USER']) continue; $users[$who] = true; } } @@ -1231,6 +1232,7 @@ function subscriber_addresslist($id){ $mlist = file($nsfile); foreach ($mlist as $who) { $who = rtrim($who); + if(!$self && $who == $_SERVER['REMOTE_USER']) continue; $users[$who] = true; } } @@ -1242,6 +1244,7 @@ function subscriber_addresslist($id){ $mlist = file($nsfile); foreach ($mlist as $who) { $who = rtrim($who); + if(!$self && $who == $_SERVER['REMOTE_USER']) continue; $users[$who] = true; } } -- GitLab