From 677e428a4dc6a2144d96c185efc65463efea08b6 Mon Sep 17 00:00:00 2001 From: Michael Reiley Date: Sat, 12 Apr 2014 11:12:42 -0700 Subject: Update copyright years. --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'post.php') diff --git a/post.php b/post.php index 366dde45..8a747add 100644 --- a/post.php +++ b/post.php @@ -2,7 +2,7 @@ /* - * Copyright (c) 2010-2013 Tinyboard Development Group + * Copyright (c) 2010-2014 Tinyboard Development Group */ // require 'inc/functions.php'; -- cgit v1.3 From 8e9db69375525c9e364a6d1c63a3300948edd13b Mon Sep 17 00:00:00 2001 From: czaks Date: Fri, 18 Apr 2014 14:32:05 +0200 Subject: post.php: load config earlier --- post.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'post.php') diff --git a/post.php b/post.php index c14b85e3..7b356bc3 100644 --- a/post.php +++ b/post.php @@ -149,6 +149,10 @@ if (isset($_POST['delete'])) { } elseif (isset($_POST['post'])) { if (!isset($_POST['body'], $_POST['board'])) error($config['error']['bot']); + + // Check if board exists + if (!openBoard($post['board'])) + error($config['error']['noboard']); if (!isset($_POST['name'])) $_POST['name'] = $config['anonymous']; @@ -172,7 +176,7 @@ if (isset($_POST['delete'])) { $post['thread'] = round($_POST['quick-reply']); } else $post['op'] = true; - + if (!(($post['op'] && $_POST['post'] == $config['button_newtopic']) || (!$post['op'] && $_POST['post'] == $config['button_reply']))) error($config['error']['bot']); @@ -184,10 +188,6 @@ if (isset($_POST['delete'])) { checkDNSBL(); - // Check if board exists - if (!openBoard($post['board'])) - error($config['error']['noboard']); - // Check if banned checkBan($board['uri']); -- cgit v1.3 From 1fb362a7c0d9ce3250f9ff167171dab4add65743 Mon Sep 17 00:00:00 2001 From: czaks Date: Fri, 18 Apr 2014 14:33:50 +0200 Subject: fix previous commit --- post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'post.php') diff --git a/post.php b/post.php index 7b356bc3..b18fc138 100644 --- a/post.php +++ b/post.php @@ -150,6 +150,8 @@ if (isset($_POST['delete'])) { if (!isset($_POST['body'], $_POST['board'])) error($config['error']['bot']); + $post = array('board' => $_POST['board']); + // Check if board exists if (!openBoard($post['board'])) error($config['error']['noboard']); @@ -164,9 +166,7 @@ if (isset($_POST['delete'])) { $_POST['subject'] = ''; if (!isset($_POST['password'])) - $_POST['password'] = ''; - - $post = array('board' => $_POST['board']); + $_POST['password'] = ''; if (isset($_POST['thread'])) { $post['op'] = false; -- cgit v1.3