1
0
Fork 0
mirror of https://github.com/Oreolek/debug-toolbar.git synced 2024-04-29 23:59:17 +03:00

Fix for auto_render logic issue.

This commit is contained in:
Soar 2011-08-29 22:44:14 +03:00
parent 634eac2d1b
commit a3a47f5615
2 changed files with 3 additions and 6 deletions

View file

@ -409,15 +409,11 @@ abstract class Kohana_DebugToolbar {
// Don't auto render toolbar for cli requests
if (Kohana::$is_cli)
return FALSE;
// Don't auto render toolbar if $_GET['debug'] = 'false'
if (isset($_GET['debug']) and strtolower($_GET['debug']) == 'false')
return FALSE;
// Don't auto render if auto_render config is FALSE
if ($config->auto_render !== TRUE)
return FALSE;
return TRUE;
}
}

View file

@ -8,4 +8,5 @@ if(Kohana::$config->load('debug_toolbar.firephp_enabled') === TRUE){
require_once $firePHP;
}
// Render Debug Toolbar on the end of application execution
register_shutdown_function('debugtoolbar::render');
if (Kohana::$config->load('debug_toolbar.auto_render') === TRUE)
register_shutdown_function('debugtoolbar::render');