summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorFredrick Brennan <admin@8chan.co>2014-05-05 18:03:51 -0400
committerFredrick Brennan <admin@8chan.co>2014-05-05 18:03:51 -0400
commitd31a3539623640815628b626fd6428abed8a5b5c (patch)
tree317d21c4f8bd94e8fbe34d708ed12f1e83f06246 /post.php
parent7f725713a1616860e2a576310005c2b90d56fc98 (diff)
Allow post deletion switch
Diffstat (limited to 'post.php')
-rw-r--r--post.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/post.php b/post.php
index 8ff99e31..43d52674 100644
--- a/post.php
+++ b/post.php
@@ -42,6 +42,10 @@ if (isset($_POST['delete'])) {
// Check if banned
checkBan($board['uri']);
+
+ // Check if deletion enabled
+ if (!$config['allow_delete'])
+ error(_('Post deletion is not allowed!'));
if (empty($delete))
error($config['error']['nodelete']);
@@ -88,7 +92,7 @@ if (isset($_POST['delete'])) {
echo json_encode(array('success' => true));
}
} elseif (isset($_POST['report'])) {
- if (!isset($_POST['board'], $_POST['password'], $_POST['reason']))
+ if (!isset($_POST['board'], $_POST['reason']))
error($config['error']['bot']);
$report = array();