From aefa20a3a4d28b0f0c284722dbc4d0eb144358b7 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Tue, 30 Nov 2010 23:17:26 +1100 Subject: [PATCH] Get board information earlier so errors can be properly displayed with a link back to the index. --- post.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/post.php b/post.php index bdc4819f..cadee9ed 100644 --- a/post.php +++ b/post.php @@ -30,7 +30,7 @@ !isset($_POST['password']) ) error(ERROR_BOT); - $post = Array(); + $post = Array('board' => $_POST['board']); if(isset($_POST['thread'])) { $OP = false; @@ -57,6 +57,17 @@ if(time()-$user['appeared']commaize(MAX_FILESIZE)))); } - sql_open(); - if(!openBoard($post['board'])) error(ERROR_NOBOARD); - if(!$OP && !threadExists($post['thread'])) - error(ERROR_NONEXISTANT); - $trip = generate_tripcode($post['name']); $post['name'] = $trip[0]; $post['trip'] = (isset($trip[1])?$trip[1]:'');