mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-27 17:00:52 +01:00
Close #293
This commit is contained in:
parent
bcfb39bde8
commit
dd5dbe65c7
18
post.php
18
post.php
@ -7,10 +7,6 @@ require_once 'inc/functions.php';
|
|||||||
require_once 'inc/anti-bot.php';
|
require_once 'inc/anti-bot.php';
|
||||||
require_once 'inc/bans.php';
|
require_once 'inc/bans.php';
|
||||||
|
|
||||||
if ((!isset($_POST['mod']) || !$_POST['mod']) && $config['board_locked']) {
|
|
||||||
error("Board is locked");
|
|
||||||
}
|
|
||||||
|
|
||||||
$dropped_post = false;
|
$dropped_post = false;
|
||||||
|
|
||||||
// Is it a post coming from NNTP? Let's extract it and pretend it's a normal post.
|
// Is it a post coming from NNTP? Let's extract it and pretend it's a normal post.
|
||||||
@ -198,6 +194,10 @@ if (isset($_POST['delete'])) {
|
|||||||
// Check if board exists
|
// Check if board exists
|
||||||
if (!openBoard($_POST['board']))
|
if (!openBoard($_POST['board']))
|
||||||
error($config['error']['noboard']);
|
error($config['error']['noboard']);
|
||||||
|
|
||||||
|
if ((!isset($_POST['mod']) || !$_POST['mod']) && $config['board_locked']) {
|
||||||
|
error("Board is locked");
|
||||||
|
}
|
||||||
|
|
||||||
// Check if banned
|
// Check if banned
|
||||||
checkBan($board['uri']);
|
checkBan($board['uri']);
|
||||||
@ -281,6 +281,10 @@ if (isset($_POST['delete'])) {
|
|||||||
// Check if board exists
|
// Check if board exists
|
||||||
if (!openBoard($_POST['board']))
|
if (!openBoard($_POST['board']))
|
||||||
error($config['error']['noboard']);
|
error($config['error']['noboard']);
|
||||||
|
|
||||||
|
if ((!isset($_POST['mod']) || !$_POST['mod']) && $config['board_locked']) {
|
||||||
|
error("Board is locked");
|
||||||
|
}
|
||||||
|
|
||||||
// Check if banned
|
// Check if banned
|
||||||
checkBan($board['uri']);
|
checkBan($board['uri']);
|
||||||
@ -357,6 +361,10 @@ if (isset($_POST['delete'])) {
|
|||||||
// Check if board exists
|
// Check if board exists
|
||||||
if (!openBoard($post['board']))
|
if (!openBoard($post['board']))
|
||||||
error($config['error']['noboard']);
|
error($config['error']['noboard']);
|
||||||
|
|
||||||
|
if ((!isset($_POST['mod']) || !$_POST['mod']) && $config['board_locked']) {
|
||||||
|
error("Board is locked");
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($_POST['name']))
|
if (!isset($_POST['name']))
|
||||||
$_POST['name'] = $config['anonymous'];
|
$_POST['name'] = $config['anonymous'];
|
||||||
@ -1274,4 +1282,4 @@ if (isset($_POST['delete'])) {
|
|||||||
// They opened post.php in their browser manually.
|
// They opened post.php in their browser manually.
|
||||||
error($config['error']['nopost']);
|
error($config['error']['nopost']);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user