|
|
@ -601,7 +601,7 @@ if (isset($_POST['delete'])) { |
|
|
|
if (!($post['has_file'] || isset($post['embed'])) || (($post['op'] && $config['force_body_op']) || (!$post['op'] && $config['force_body']))) { |
|
|
|
$stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']); |
|
|
|
if ($stripped_whitespace == '') { |
|
|
|
error($config['error']['tooshort_body']); |
|
|
|
error($config['error']['no_body']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -743,9 +743,11 @@ if (isset($_POST['delete'])) { |
|
|
|
if (mb_strlen($post['subject']) > 100) |
|
|
|
error(sprintf($config['error']['toolong'], 'subject')); |
|
|
|
if (!$mod && mb_strlen($post['body']) > $config['max_body']) |
|
|
|
error($config['error']['toolong_body']); |
|
|
|
error(sprintf($config['error']['toolong_body'], $config['max_body'])); |
|
|
|
if (!$mod && mb_strlen($post['body']) > 0 && (mb_strlen($post['body']) < $config['min_body'])) |
|
|
|
error($config['error']['tooshort_body']); |
|
|
|
error(sprintf($config['error']['tooshort_body'], $config['min_body'])); |
|
|
|
if (mb_strlen($post['body']) < $config['min_body_op'] && $post['op']) |
|
|
|
error(sprintf($config['error']['tooshort_body_op'], $config['min_body_op'])); |
|
|
|
if (mb_strlen($post['password']) > 20) |
|
|
|
error(sprintf($config['error']['toolong'], 'password')); |
|
|
|
} |
|
|
|