Reworked profiler

This commit is contained in:
Anton Terekhov
2011-07-29 13:05:23 +04:00
parent 77a62925d8
commit 165bf08c09
12 changed files with 2351 additions and 65 deletions

View File

@ -118,7 +118,14 @@ class FrontController
$layout = new $layout_class();
$html = $layout->fetch($action);
return (!DEBUG) ? $html : Profiler::getInstance()->end($html);
if (DEBUG) {
if (is_subclass_of($action, 'AjaxAction')) {
Profiler::getInstance()->getJson();
} else {
$html = Profiler::getInstance()->end($html);
}
}
return $html;
} catch(Exception $e) {
if (DEBUG == true) {
if (!headers_sent()) {