From 36b52fa8ecbcd3b1559a1f49cbfdb4bf413e2773 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 9 Mar 2006 02:18:49 +0000 Subject: Many small fixes due to the result of zend analyzer. --- framework/Log/TLogRouter.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/Log') diff --git a/framework/Log/TLogRouter.php b/framework/Log/TLogRouter.php index 3b8bef94..d5bf3cb1 100644 --- a/framework/Log/TLogRouter.php +++ b/framework/Log/TLogRouter.php @@ -584,13 +584,15 @@ class TBrowserLogRoute extends TLogRoute public function processLogs($logs) { if(empty($logs) || $this->getApplication()->getMode()==='Performance') return; - $first = $logs[0][3]; $prev = $first; $total = 0; $delta = 0; $even = true; + $first = $logs[0][3]; + $prev = $first; + $even = true; $response = $this->getApplication()->getResponse(); $response->write($this->renderHeader()); foreach($logs as $log) { $timing['total'] = $log[3] - $first; - $timing['delta'] = $log[3]-$prev; + $timing['delta'] = $log[3] - $prev; $timing['even'] = !($even = !$even); $prev=$log[3]; $response->write($this->renderMessage($log,$timing)); @@ -600,8 +602,6 @@ class TBrowserLogRoute extends TLogRoute protected function renderHeader() { - $category = is_array($this->getCategories()) ? - implode(', ',$this->getCategories()) : ''; $string = << @@ -648,6 +648,7 @@ EOD; case TLogger::ALERT: return '#ff00ff'; case TLogger::FATAL: return 'red'; } + return ''; } protected function renderFooter() -- cgit v1.2.3