This commit is contained in:
Roman Kelesidis 2024-07-01 00:20:30 +07:00
parent 5af158e26b
commit 424221fbdd
2 changed files with 18 additions and 7 deletions

View File

@ -142,17 +142,28 @@ class ajax_common
// Exit if board is disabled via ON/OFF trigger or by admin // Exit if board is disabled via ON/OFF trigger or by admin
if ($bb_cfg['board_disable'] || file_exists(BB_DISABLED)) 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']) if (!DBG_USER) $this->ajax_die($lang['BOARD_DISABLE']);
{
$this->ajax_die($lang['BOARD_DISABLE']);
}
} }
if (file_exists(BB_DISABLED)) elseif (file_exists(BB_DISABLED))
{ {
$this->ajax_die($lang['BOARD_DISABLE_CRON']); $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 // Auth check

View File

@ -523,7 +523,7 @@ if (($bb_cfg['board_disable'] || file_exists(BB_DISABLED)) && !defined('IN_ADMIN
{ {
// admin lock // admin lock
send_no_cache_headers(); send_no_cache_headers();
bb_die('BOARD_DISABLE'); if (!DBG_USER) bb_die('BOARD_DISABLE');
} }
else if (file_exists(BB_DISABLED)) else if (file_exists(BB_DISABLED))
{ {