From b740a5465af013bc4e530678eea558802f90dfad Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 7 Mar 2023 15:14:16 +0700 Subject: [PATCH] Fixed HTTP 500 error [AJAX] Fixed bug from previous PR #567 --- src/Legacy/Ajax.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Legacy/Ajax.php b/src/Legacy/Ajax.php index a674a7151..fbae127cd 100644 --- a/src/Legacy/Ajax.php +++ b/src/Legacy/Ajax.php @@ -81,11 +81,13 @@ class Ajax } // Exit if board is disabled via ON/OFF trigger or by admin - if ($action_params[1] !== true) { - if ($bb_cfg['board_disable']) { - $this->ajax_die($lang['BOARD_DISABLE']); - } elseif (file_exists(BB_DISABLED)) { - $this->ajax_die($lang['BOARD_DISABLE_CRON']); + if ($bb_cfg['board_disable'] || file_exists(BB_DISABLED)) { + if ($action_params[1] !== true) { + if ($bb_cfg['board_disable']) { + $this->ajax_die($lang['BOARD_DISABLE']); + } elseif (file_exists(BB_DISABLED)) { + $this->ajax_die($lang['BOARD_DISABLE_CRON']); + } } }