summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorMichael <savetheinternet@tinyboard.org>2013-01-18 23:44:44 -0800
committerMichael <savetheinternet@tinyboard.org>2013-01-18 23:44:44 -0800
commit5c4421b4fd48d082ad35aff1bfc642e9e4047aad (patch)
tree51ec3acc376e5f4be3587fa3c2861a76abfda8a8 /post.php
parentaccc3992f324da39f7725971cff86d080c8f9177 (diff)
parent0da1c18a7ff2328a3cdd422e3f67d4b4bf403fb5 (diff)
Merge pull request #95 from Macil/nosubject
Add field_disable_subject and field_disable_reply_subject config options
Diffstat (limited to 'post.php')
-rw-r--r--post.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/post.php b/post.php
index 98da7486..54065832 100644
--- a/post.php
+++ b/post.php
@@ -139,7 +139,7 @@ if (isset($_POST['delete'])) {
header('Location: ' . $root . $board['dir'] . $config['file_index'], true, $config['redirect_http']);
} elseif (isset($_POST['post'])) {
- if (!isset($_POST['subject'], $_POST['body'], $_POST['board']))
+ if (!isset($_POST['body'], $_POST['board']))
error($config['error']['bot']);
if (!isset($_POST['name']))
@@ -148,6 +148,9 @@ if (isset($_POST['delete'])) {
if (!isset($_POST['email']))
$_POST['email'] = '';
+ if (!isset($_POST['subject']))
+ $_POST['subject'] = '';
+
if (!isset($_POST['password']))
$_POST['password'] = '';
@@ -271,6 +274,9 @@ if (isset($_POST['delete'])) {
if ($config['field_disable_password'])
$_POST['password'] = '';
+
+ if ($config['field_disable_subject'] || (!$post['op'] && $config['field_disable_reply_subject']))
+ $_POST['subject'] = '';
}
// Check for a file