diff options
| author | czaks <marcin@6irc.net> | 2014-04-18 14:32:05 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-04-18 14:32:05 +0200 |
| commit | 8e9db69375525c9e364a6d1c63a3300948edd13b (patch) | |
| tree | cfe14fd3d235a74d675988def6df387e9049749b | |
| parent | df077197bb178449b238ba9f4e35752e37cc420e (diff) | |
post.php: load config earlier
| -rw-r--r-- | post.php | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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']); |
