From 5ff5ea71de09c6e15d0fd1ea30b600a3bed0e316 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 4 Jul 2011 08:29:16 +0000 Subject: [PATCH] Fixed Trac#424: error when updating the Data Synchro statistics SVN:trunk[1323] --- synchro/synchrodatasource.class.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/synchro/synchrodatasource.class.inc.php b/synchro/synchrodatasource.class.inc.php index 905fde94b0..0a3a98df05 100644 --- a/synchro/synchrodatasource.class.inc.php +++ b/synchro/synchrodatasource.class.inc.php @@ -1621,7 +1621,7 @@ class SynchroReplica extends DBObject implements iDisplay } else { - $this->UpdateObjectFromReplica($oDestObj, $aAttributes, $oChange, $oStatLog, 'stats_nb_obj', 'stats_nb_obj_updated_errors'); + $this->UpdateObjectFromReplica($oDestObj, $aAttributes, $oChange, $oStatLog, '', 'stats_nb_obj_updated_errors'); } break; @@ -1651,13 +1651,19 @@ class SynchroReplica extends DBObject implements iDisplay { $oDestObj->DBUpdateTracked($oChange); $oStatLog->AddTrace('Updated object - Values: {'.implode(', ', $aValueTrace).'}', $this); - $oStatLog->Inc($sStatsCode.'_updated'); + if ($sStatsCode != '') + { + $oStatLog->Inc($sStatsCode.'_updated'); + } $this->Set('info_last_modified', date('Y-m-d H:i:s')); } else { $oStatLog->AddTrace('Unchanged object', $this); - $oStatLog->Inc($sStatsCode.'_unchanged'); + if ($sStatsCode != '') + { + $oStatLog->Inc($sStatsCode.'_unchanged'); + } } $this->Set('status_last_error', '');