diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index d504e1362..891d47ab6 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -3372,24 +3372,6 @@ class AttributeStopWatch extends AttributeDefinition return $proposedValue; } - public function Equals($val1, $val2) - { - if ($val1 === $val2) return true; - - if (is_object($val1) != is_object($val2)) - { - return false; - } - if (!is_object($val1)) - { - // string ? - return false; - } - - // Both values are Object sets - return $val1->HasSameContents($val2); - } - public function GetSQLExpressions($sPrefix = '') { if ($sPrefix == '') diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index 73cae09b4..f71feba9d 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -54,32 +54,6 @@ class ormStopWatch $this->aThresholds = array(); } - // BUGGY - DOES NOT DETECT A CHANGE IN THE DEADLINE - // - public function HasSameContents($oStopWatch) - { - if ($oStopWatch->iTimeSpent != $this->iTimeSpent) return false; - if ($oStopWatch->iStarted != $this->iStarted) return false; - if ($oStopWatch->iLastStart != $this->iLastStart) return false; - if ($oStopWatch->iStopped != $this->iStopped) return false; - if ($oStopWatch->aThresholds != $this->aThresholds) return false; - - // Array comparison is not recursive... let's do it by myself - foreach ($oStopWatch->aThresholds as $iPercent => $aThresholdData) - { - // Assumption: the thresholds will not change dynamically (defined at application design time) - $aThisThresholdData = $this->aThresholds[$iPercent]; - if ($aThisThresholdData['deadline'] != $aThresholdData['deadline']) return false; - if ($aThisThresholdData['passed'] != $aThresholdData['passed']) return false; - if ($aThisThresholdData['triggered'] != $aThresholdData['triggered']) return false; - if ($aThisThresholdData['overrun'] != $aThresholdData['overrun']) return false; - } - -return false; - - return true; - } - /** * Necessary for the triggers */