From d9d8dce7ade836b62699b1d99614a79bef112707 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Mon, 12 Dec 2011 10:47:48 +0400 Subject: [PATCH] fix hacker console, Issue #53 --- engine/include/function.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/engine/include/function.php b/engine/include/function.php index 2d7481bd..856e3516 100644 --- a/engine/include/function.php +++ b/engine/include/function.php @@ -53,14 +53,12 @@ function isAjaxRequest() { /** * функция вывода отладочных сообщений через "хакерскую" консоль Дмитрия Котерова */ -if (Config::Get('sys.logs.hacker_console') && !isAjaxRequest()) { - require_once Config::Get('path.root.server')."/engine/lib/external/HackerConsole/Main.php"; - new Debug_HackerConsole_Main(true); -} - - -function dump($msg) { +function dump($msg) { if (Config::Get('sys.logs.hacker_console') && !isAjaxRequest()) { + if (!class_exists('Debug_HackerConsole_Main')) { + require_once Config::Get('path.root.server')."/engine/lib/external/HackerConsole/Main.php"; + new Debug_HackerConsole_Main(true); + } call_user_func(array('Debug_HackerConsole_Main', 'out'), $msg); } else { //var_dump($msg);