summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2019-03-22 04:08:02 +1000
committerBenjamin Southall <applemansigloo@gmail.com>2019-03-22 04:08:02 +1000
commit9b513c0900ae1f18dc8b83076c57490460c3de53 (patch)
tree25676e8df81cf139561e645304ad4c32b36f1a66
parent55574162b1c76ca00be1f6ac75e1ef753ec59838 (diff)
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
-rw-r--r--post.php15
1 files 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'];