From 81e0720ee52c7a4778d7b241b1a007eca52c29ae Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 13 Jul 2011 07:36:27 +0000 Subject: [PATCH] notification/tracker: in special cases, the owner of an entry was notified twice; now control who is notified in the first (admin) notification run, and pass the already notified email-addresses to the general run; add missing static to get_details of notifications for tracker (backport r35727) --- etemplate/inc/class.bo_tracking.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index b8c9ef32ee..919be365fc 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -460,11 +460,13 @@ abstract class bo_tracking * @param array $data current entry * @param array $old=null old/last state of the entry or null for a new entry * @param boolean $deleted=null can be set to true to let the tracking know the item got deleted or undelted + * @param array $email_notified=null if present will return the emails notified, if given emails in that list will not be notified * @return boolean true on success, false on error (error messages are in $this->errors) */ - public function do_notifications($data,$old,$deleted=null) + public function do_notifications($data,$old,$deleted=null,&$email_notified=null) { $this->errors = $email_sent = array(); + if (!empty($email_notified) && is_array($email_notified)) $email_sent = $email_notified; if (!$this->notify_current_user && $this->user) // do we have a current user and should we notify the current user about his own changes { @@ -545,6 +547,7 @@ abstract class bo_tracking { translation::init(); } + $email_notified = $email_sent; return !count($this->errors); }