summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
authorxue <>2006-04-18 15:25:55 +0000
committerxue <>2006-04-18 15:25:55 +0000
commit7fe4f0ec9b89ba568cf0ddabffd929ed8e6739a5 (patch)
treea93fd238ccf6b9de2e1ad0c7af4cdc8e09086328 /framework/Util
parent0b6ffbe14058e7453ae9861d2e4a1633b0a2f534 (diff)
Merge from 3.0 branch till 938.
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TLogRouter.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php
index 06d70b1e..233fd373 100644
--- a/framework/Util/TLogRouter.php
+++ b/framework/Util/TLogRouter.php
@@ -591,17 +591,18 @@ class TBrowserLogRoute extends TLogRoute
{
if(empty($logs) || $this->getApplication()->getMode()==='Performance') return;
$first = $logs[0][3];
- $prev = $first;
$even = true;
$response = $this->getApplication()->getResponse();
$response->write($this->renderHeader());
- foreach($logs as $log)
+ for($i=0,$n=count($logs);$i<$n;++$i)
{
- $timing['total'] = $log[3] - $first;
- $timing['delta'] = $log[3] - $prev;
+ $timing['total'] = $logs[$i][3] - $first;
+ if ($i<$n-1)
+ $timing['delta'] = $logs[$i+1][3] - $logs[$i][3];
+ else
+ $timing['delta'] = '?';
$timing['even'] = !($even = !$even);
- $prev=$log[3];
- $response->write($this->renderMessage($log,$timing));
+ $response->write($this->renderMessage($logs[$i],$timing));
}
$response->write($this->renderFooter());
}