From 9b513c0900ae1f18dc8b83076c57490460c3de53 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Fri, 22 Mar 2019 04:08:02 +1000 Subject: [PATCH] As per vichan upstream move locked board check to after openBoard call in handle_post. Unlike upstream , the board being locked doesn't stop reports or deletions being processed for that board, just new posts --- post.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/post.php b/post.php index 00e458f5..a2eaa523 100644 --- a/post.php +++ b/post.php @@ -17,13 +17,6 @@ if (get_magic_quotes_gpc()) { $_POST = strip_array($_POST); } -$board_locked_check = (!isset($_POST['mod']) || !$_POST['mod']) - && ($config['board_locked']===true - || (is_array($config['board_locked']) && in_array(strtolower($_POST['board']), $config['board_locked']))); - -if ($board_locked_check){ - error("Board is locked"); -} $dropped_post = false; @@ -414,6 +407,14 @@ function handle_post(){ if (!openBoard($post['board'])) error($config['error']['noboard']); + $board_locked_check = (!isset($_POST['mod']) || !$_POST['mod']) + && ($config['board_locked']===true + || (is_array($config['board_locked']) && in_array(strtolower($_POST['board']), $config['board_locked']))); + + if ($board_locked_check){ + error("Board is locked"); + } + if (!isset($_POST['name'])) $_POST['name'] = $config['anonymous'];