From 90033e9dea3c273570fba8855009d0b9bf550393 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 2 Oct 2005 14:53:42 +0200 Subject: [PATCH] no subscribermails for minor edits darcs-hash:20051002125342-7ad00-42c9155d81a7799f24ec02f6aac210d2ea818e51.gz --- inc/common.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/inc/common.php b/inc/common.php index 3589eae14..e08858665 100644 --- a/inc/common.php +++ b/inc/common.php @@ -826,8 +826,8 @@ function saveWikiText($id,$text,$summary,$minor=false){ addLogEntry(@filemtime($file),$id,$summary,$minor); // send notify mails - notify($id,'admin',$old,$summary); - notify($id,'subscribers',$old,$summary); + notify($id,'admin',$old,$summary,$minor); + notify($id,'subscribers',$old,$summary,$minor); //purge cache on add by updating the purgefile if($conf['purgeonadd'] && (!$old || $del)){ @@ -860,14 +860,15 @@ function saveOldRevision($id){ /** * Sends a notify mail on page change * - * @param string $id The changed page - * @param string $who Who to notify (admin|subscribers) - * @param int $rev Old page revision - * @param string $summary What changed + * @param string $id The changed page + * @param string $who Who to notify (admin|subscribers) + * @param int $rev Old page revision + * @param string $summary What changed + * @param boolean $minor Is this a minor edit? * * @author Andreas Gohr <andi@splitbrain.org> */ -function notify($id,$who,$rev='',$summary=''){ +function notify($id,$who,$rev='',$summary='',$minor=false){ global $lang; global $conf; @@ -879,6 +880,7 @@ function notify($id,$who,$rev='',$summary=''){ $bcc = ''; }elseif($who == 'subscribers'){ if(!$conf['subscribers']) return; //subscribers enabled? + if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors $bcc = subscriber_addresslist($id); if(empty($bcc)) return; $to = ''; -- GitLab