Backported r29080 (Last Modified sort header), r29431 (translation and

fixes), r29141 (Skip notification check box) and r29433 (fixes) to 9.2
This commit is contained in:
Ralf Becker 2010-03-07 14:50:24 +00:00
parent f499955670
commit 3d482fbcef

View File

@ -6,7 +6,7 @@
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package etemplate
* @subpackage api
* @copyright (c) 2007-9 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2007-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
@ -217,9 +217,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 undelted
* @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'];
@ -230,7 +231,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;
}