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:
parent
634eac2d1b
commit
a3a47f5615
|
@ -409,15 +409,11 @@ abstract class Kohana_DebugToolbar {
|
||||||
// Don't auto render toolbar for cli requests
|
// Don't auto render toolbar for cli requests
|
||||||
if (Kohana::$is_cli)
|
if (Kohana::$is_cli)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Don't auto render toolbar if $_GET['debug'] = 'false'
|
// Don't auto render toolbar if $_GET['debug'] = 'false'
|
||||||
if (isset($_GET['debug']) and strtolower($_GET['debug']) == 'false')
|
if (isset($_GET['debug']) and strtolower($_GET['debug']) == 'false')
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Don't auto render if auto_render config is FALSE
|
|
||||||
if ($config->auto_render !== TRUE)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
3
init.php
3
init.php
|
@ -8,4 +8,5 @@ if(Kohana::$config->load('debug_toolbar.firephp_enabled') === TRUE){
|
||||||
require_once $firePHP;
|
require_once $firePHP;
|
||||||
}
|
}
|
||||||
// Render Debug Toolbar on the end of application execution
|
// 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');
|
Loading…
Reference in a new issue