1
0
Fork 0
mirror of https://github.com/Oreolek/debug-toolbar.git synced 2024-04-27 14:49:18 +03:00

autorender fix (#17)

This commit is contained in:
smgladkovskiy 2011-09-08 00:16:48 +04:00
parent 6145358562
commit e6fb886260
2 changed files with 9 additions and 6 deletions

View file

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

View file

@ -1,8 +1,11 @@
<?php defined('SYSPATH') or die('No direct script access.');
$config = Kohana::config('debug_toolbar');
// Load FirePHP if it enabled in config
if(Kohana::config('debug_toolbar.firephp_enabled') === TRUE)
if($config->firephp_enabled === TRUE)
require_once Kohana::find_file('vendor', 'firephp/packages/core/lib/FirePHPCore/FirePHP.class');
// Render Debug Toolbar on the end of application execution
register_shutdown_function('debugtoolbar::render');
if ($config->auto_render === TRUE)
register_shutdown_function('debugtoolbar::render');