Reworked profiler
This commit is contained in:
@ -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()) {
|
||||
|
Reference in New Issue
Block a user