mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 18:33:39 +01:00
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)
This commit is contained in:
parent
e4da700ff4
commit
81e0720ee5
@ -460,11 +460,13 @@ abstract class bo_tracking
|
|||||||
* @param array $data current entry
|
* @param array $data current entry
|
||||||
* @param array $old=null old/last state of the entry or null for a new 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 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)
|
* @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();
|
$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
|
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();
|
translation::init();
|
||||||
}
|
}
|
||||||
|
$email_notified = $email_sent;
|
||||||
return !count($this->errors);
|
return !count($this->errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user