optionally disable image requirement for new threads
This commit is contained in:
parent
3b2088ca75
commit
be860577a9
@ -248,6 +248,8 @@
|
||||
$config['force_body_op'] = true;
|
||||
// Strip superfluous new lines at the end of a post
|
||||
$config['strip_superfluous_returns'] = true;
|
||||
// Require an image for threads?
|
||||
$config['force_image_op'] = true;
|
||||
|
||||
// Max body length
|
||||
$config['max_body'] = 1800;
|
||||
|
4
post.php
4
post.php
@ -235,7 +235,7 @@
|
||||
|
||||
// Check for a file
|
||||
if($OP && !isset($post['no_longer_require_an_image_for_op'])) {
|
||||
if(!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name']))
|
||||
if(!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name']) && $config['force_image_op'])
|
||||
error($config['error']['noimage']);
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@
|
||||
$post['email'] = utf8tohtml($_POST['email']);
|
||||
$post['body'] = $_POST['body'];
|
||||
$post['password'] = $_POST['password'];
|
||||
$post['has_file'] = !isset($post['embed']) && (($OP && !isset($post['no_longer_require_an_image_for_op'])) || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name'])));
|
||||
$post['has_file'] = !isset($post['embed']) && (($OP && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || (isset($_FILES['file']) && !empty($_FILES['file']['tmp_name'])));
|
||||
|
||||
$post['mod'] = isset($_POST['mod']) && $_POST['mod'];
|
||||
if($post['has_file'])
|
||||
|
Loading…
Reference in New Issue
Block a user