From 1522a687671c8229bd492e9435c0eaf5ae797836 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 3 Nov 2023 00:05:46 +0700 Subject: [PATCH] Updated --- ajax.php | 4 ++-- library/config.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ajax.php b/ajax.php index 762b4fad..28ad7554 100644 --- a/ajax.php +++ b/ajax.php @@ -215,7 +215,7 @@ class ajax_common { $this->response['error_code'] = $error_code; $this->response['error_msg'] = strip_tags(preg_replace('##i', "\n", $error_msg)); - if (DEBUG_AJAX_DIE) + if (!empty($_COOKIE['explain'])) { $ajax_debug = 'ajax die: ' . $this->debug_find_source(); $this->response['error_msg'] .= "\n\n" . $ajax_debug; @@ -345,7 +345,7 @@ class ajax_common */ function debug_find_source ($mode = '') { - if (!DEBUG_AJAX_DIE) return 'src disabled'; + if (empty($_COOKIE['explain'])) return 'src disabled'; foreach (debug_backtrace() as $trace) { if (!empty($trace['file']) && $trace['file'] !== __FILE__) diff --git a/library/config.php b/library/config.php index fc92f076..5cc446e9 100644 --- a/library/config.php +++ b/library/config.php @@ -323,7 +323,6 @@ define('SPHINX_LOG_NAME', 'sphinx_errors'); // имя файла с лог define('DBG_LOG', true); // включить логирование событий движка (отключите на боевом сервере) define('DBG_LOG_TRACKER', false); // включить логирование событий анонсера (отключите на боевом сервере) -define('DEBUG_AJAX_DIE', true); // отображать в консоли браузера и в alert окне файл:строку в которой происходит вызов ajax_die() define('COOKIE_DBG', 'bb_dbg'); // debug cookie name define('SQL_DEBUG', true); // включить отладку для SQL запросов и Cache & Datastore define('SQL_BB_LOG_NAME', 'sql_error_bb'); // имя лог файла с SQL ошибками (Форум)