diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php
index 781ea51105..d1ea1acc23 100644
--- a/etemplate/inc/class.bo_tracking.inc.php
+++ b/etemplate/inc/class.bo_tracking.inc.php
@@ -144,6 +144,7 @@ abstract class bo_tracking
* @var int;
*/
var $user;
+
/**
* Saved user preferences, if send_notifications need to set an other language
*
@@ -269,6 +270,7 @@ abstract class bo_tracking
* - 'subject' string subject line for the notification of $data,$old, defaults to link-title
* - 'link' string of link to view $data
* - 'sender' sender of email
+ * - 'skip_notify' array of email addresses that should _not_ be notified
* @param array $data current entry
* @param array $old=null old/last state of the entry or null for a new entry
* @return mixed
@@ -522,6 +524,11 @@ abstract class bo_tracking
//error_log("do_notificaton() adding user=$this->user to email_sent, to not notify him");
$email_sent[] = $GLOBALS['egw']->accounts->id2name($this->user,'account_email');
}
+ $skip_notify = $this->get_config('skip_notify',$data,$old);
+ if($skip_notify && is_array($skip_notify))
+ {
+ $email_sent = array_merge($email_sent, $skip_notify);
+ }
// entry creator
if ($this->creator_field && ($email = $GLOBALS['egw']->accounts->id2name($data[$this->creator_field],'account_email')) &&
@@ -923,6 +930,10 @@ abstract class bo_tracking
{
$body .= "\n";
}
+ if($sig = $this->get_signature($data,$old,$receiver))
+ {
+ $body .= ($html_email ? '
':'') . "\n$sig";
+ }
return $body;
}
@@ -1029,4 +1040,26 @@ abstract class bo_tracking
{
return array();
}
+
+ /**
+ * Get a (global) signature to append to the change notificaiton
+ */
+ protected function get_signature($data, $old, $receiver)
+ {
+ $config = config::read('notifications');
+
+ if(class_exists($this->app. '_merge'))
+ {
+ $merge_class = $this->app.'_merge';
+ $merge = new $merge_class();
+ $sig = $merge->merge_string($config['signature'], array($data[$this->id_field]), $error, 'text/html');
+ if($error)
+ {
+ error_log($error);
+ return $config['signature'];
+ }
+ return $sig;
+ }
+ return $config['signature'];
+ }
}
diff --git a/notifications/templates/default/config.tpl b/notifications/templates/default/config.tpl
index cf63aed9c2..e4b5c46e23 100644
--- a/notifications/templates/default/config.tpl
+++ b/notifications/templates/default/config.tpl
@@ -69,6 +69,13 @@
+