From ec97e6d2e022d8bf8e1870da1b83419d42392dab Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Mon, 27 Apr 2015 09:24:09 +0000 Subject: [PATCH] ormStopWatch::GetElapsedTime not working in case of queries containing :this-> parameters (the prototype of GetElapsedTime has changed and is NOT compatible with the previous one) SVN:trunk[3564] --- core/ormstopwatch.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index eb3f24cd9..4ab64c24e 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -86,8 +86,9 @@ class ormStopWatch * Get the working elapsed time since the start of the stop watch * even if it is currently running * @param oAttDef AttributeDefinition Attribute hosting the stop watch + * @param oObject Hosting object (used for query parameters) */ - public function GetElapsedTime($oAttDef) + public function GetElapsedTime($oAttDef, $oObject) { if (is_null($this->iLastStart)) { @@ -95,7 +96,7 @@ class ormStopWatch } else { - $iElapsed = $this->ComputeDuration($this, $oAttDef, $this->iLastStart, time()); + $iElapsed = $this->ComputeDuration($oObject, $oAttDef, $this->iLastStart, time()); return $this->iTimeSpent + $iElapsed; } }