From 83b60b81fc6d0b681d5fb2ad928256e9b5ae1b36 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 7 Mar 2010 14:45:12 +0000 Subject: [PATCH] Fixed r29141: "Add a checkbox to allow user to prevent notification of changes to a ticket", to NOT prevent history logging, if checked --- etemplate/inc/class.bo_tracking.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index 5a6440d402..b699df4c44 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -6,7 +6,7 @@ * @author Ralf Becker * @package etemplate * @subpackage api - * @copyright (c) 2007-9 by Ralf Becker + * @copyright (c) 2007-10 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -211,9 +211,10 @@ abstract class bo_tracking * @param int $user=null user who made the changes, default to current user * @param boolean $deleted=null can be set to true to let the tracking know the item got deleted or undeleted * @param array $changed_fields=null changed fields from ealier call to $this->changed_fields($data,$old), to not compute it again + * @param boolean $skip_notification=false do NOT send any notification * @return int|boolean false on error, integer number of changes logged or true for new entries ($old == null) */ - public function track(array $data,array $old=null,$user=null,$deleted=null,array $changed_fields=null) + public function track(array $data,array $old=null,$user=null,$deleted=null,array $changed_fields=null,$skip_notification=false) { $this->user = !is_null($user) ? $user : $GLOBALS['egw_info']['user']['account_id']; @@ -224,7 +225,7 @@ abstract class bo_tracking $changes = $this->save_history($data,$old,$deleted,$changed_fields); } // do not run do_notifications if we have no changes - if ($changes && !$this->do_notifications($data,$old,$deleted)) + if ($changes && !$skip_notification && !$this->do_notifications($data,$old,$deleted)) { $changes = false; }