mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 07:50:23 +01:00
Trial: checkDNSBL only if file
This commit is contained in:
parent
643e5ae80b
commit
9a2155914c
5
post.php
5
post.php
@ -218,8 +218,6 @@ elseif (isset($_POST['post'])) {
|
|||||||
if (!openBoard($post['board']))
|
if (!openBoard($post['board']))
|
||||||
error($config['error']['noboard']);
|
error($config['error']['noboard']);
|
||||||
|
|
||||||
checkDNSBL();
|
|
||||||
|
|
||||||
// Check if banned
|
// Check if banned
|
||||||
checkBan($board['uri']);
|
checkBan($board['uri']);
|
||||||
|
|
||||||
@ -394,6 +392,9 @@ elseif (isset($_POST['post'])) {
|
|||||||
$post['password'] = $_POST['password'];
|
$post['password'] = $_POST['password'];
|
||||||
$post['has_file'] = (!isset($post['embed']) && (($post['op'] && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || !empty($_FILES['file']['name'])));
|
$post['has_file'] = (!isset($post['embed']) && (($post['op'] && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || !empty($_FILES['file']['name'])));
|
||||||
|
|
||||||
|
if ($post['has_file'])
|
||||||
|
checkDNSBL();
|
||||||
|
|
||||||
if (!($post['has_file'] || isset($post['embed'])) || (($post['op'] && $config['force_body_op']) || (!$post['op'] && $config['force_body']))) {
|
if (!($post['has_file'] || isset($post['embed'])) || (($post['op'] && $config['force_body_op']) || (!$post['op'] && $config['force_body']))) {
|
||||||
// http://stackoverflow.com/a/4167053
|
// http://stackoverflow.com/a/4167053
|
||||||
$stripped_whitespace = preg_replace('/^[\pZ\pC]+|[\pZ\pC]+$/u', '', $post['body']);
|
$stripped_whitespace = preg_replace('/^[\pZ\pC]+|[\pZ\pC]+$/u', '', $post['body']);
|
||||||
|
Loading…
Reference in New Issue
Block a user