summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-04-19 00:24:52 +0200
committerczaks <marcin@6irc.net>2014-04-19 00:24:52 +0200
commitbfc4df8276f1f3577e8d40f300ed0f3f02613cd0 (patch)
treeff3a2e0d49a9c3d8058aa46df600d2b6eac674f2 /post.php
parent5b9b0abc54d2aa7f632909ecdfeb11862dffb9ae (diff)
parentbd498227f5faebad7058efeae1f7badc469d7a0e (diff)
Merge branch 'master' of github.com:vichan-devel/Tinyboard into br-integration
Diffstat (limited to 'post.php')
-rw-r--r--post.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/post.php b/post.php
index 99b1110b..b18fc138 100644
--- a/post.php
+++ b/post.php
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright (c) 2010-2013 Tinyboard Development Group
+ * Copyright (c) 2010-2014 Tinyboard Development Group
*/
require 'inc/functions.php';
@@ -149,6 +149,12 @@ if (isset($_POST['delete'])) {
} elseif (isset($_POST['post'])) {
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']);
if (!isset($_POST['name']))
$_POST['name'] = $config['anonymous'];
@@ -160,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;
@@ -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']);