Allow post deletion switch

This commit is contained in:
Fredrick Brennan 2014-05-05 18:03:51 -04:00
parent 7f725713a1
commit d31a353962
3 changed files with 9 additions and 1 deletions

View file

@ -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();