From 424221fbdd59ffe452fd343543430db614991f75 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 1 Jul 2024 00:20:30 +0700 Subject: [PATCH] Updated --- ajax.php | 23 +++++++++++++++++------ library/includes/init_bb.php | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ajax.php b/ajax.php index b696e91f..14b06cd1 100644 --- a/ajax.php +++ b/ajax.php @@ -142,17 +142,28 @@ class ajax_common // Exit if board is disabled via ON/OFF trigger or by admin if ($bb_cfg['board_disable'] || file_exists(BB_DISABLED)) { - if (!isset($action_params[AJAX_ALWAYS_ACTIVE]) || $action_params[AJAX_ALWAYS_ACTIVE] === false) + if ($bb_cfg['board_disable']) { - if ($bb_cfg['board_disable']) - { - $this->ajax_die($lang['BOARD_DISABLE']); - } + if (!DBG_USER) $this->ajax_die($lang['BOARD_DISABLE']); } - if (file_exists(BB_DISABLED)) + elseif (file_exists(BB_DISABLED)) { $this->ajax_die($lang['BOARD_DISABLE_CRON']); } + + // Старый вариант + // + // if (!isset($action_params[AJAX_ALWAYS_ACTIVE]) || $action_params[AJAX_ALWAYS_ACTIVE] === false) + // { + // if ($bb_cfg['board_disable']) + // { + // $this->ajax_die($lang['BOARD_DISABLE']); + // } + // } + // if (file_exists(BB_DISABLED)) + // { + // $this->ajax_die($lang['BOARD_DISABLE_CRON']); + // } } // Auth check diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index 4fc07478..c21ec4f0 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -523,7 +523,7 @@ if (($bb_cfg['board_disable'] || file_exists(BB_DISABLED)) && !defined('IN_ADMIN { // admin lock send_no_cache_headers(); - bb_die('BOARD_DISABLE'); + if (!DBG_USER) bb_die('BOARD_DISABLE'); } else if (file_exists(BB_DISABLED)) {