From 5bee765d9242d434f60c930b594fc1c1bbcf9e7e Mon Sep 17 00:00:00 2001 From: Mark Story Date: Mon, 5 Jan 2009 22:14:49 -0500 Subject: [PATCH] Refactoring long check --- controllers/components/toolbar.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/components/toolbar.php b/controllers/components/toolbar.php index c9c8d71c7..6c00c0730 100644 --- a/controllers/components/toolbar.php +++ b/controllers/components/toolbar.php @@ -109,7 +109,8 @@ function startup(&$controller) { $currentViewClass = $controller->view; $this->_makeViewClass($currentViewClass); $controller->view = 'DebugKit.Debug'; - if (!$this->RequestHandler->isAjax() && (!isset($controller->params['url']['ext']) || (isset($controller->params['url']['ext']) && $controller->params['url']['ext'] == 'html'))) { + $isHtml = (!isset($controller->params['url']['ext']) || (isset($controller->params['url']['ext']) && $controller->params['url']['ext'] == 'html')); + if (!$this->RequestHandler->isAjax() && $isHtml) { $format = 'Html'; } else { $format = 'FirePhp';