From a3a47f56150de44799d04c865b6531569050b0db Mon Sep 17 00:00:00 2001 From: Soar Date: Mon, 29 Aug 2011 22:44:14 +0300 Subject: [PATCH] Fix for auto_render logic issue. --- classes/kohana/debugtoolbar.php | 6 +----- init.php | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/classes/kohana/debugtoolbar.php b/classes/kohana/debugtoolbar.php index 88be591..309166b 100644 --- a/classes/kohana/debugtoolbar.php +++ b/classes/kohana/debugtoolbar.php @@ -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; } } \ No newline at end of file diff --git a/init.php b/init.php index 0f50359..91b1846 100644 --- a/init.php +++ b/init.php @@ -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'); \ No newline at end of file +if (Kohana::$config->load('debug_toolbar.auto_render') === TRUE) + register_shutdown_function('debugtoolbar::render'); \ No newline at end of file