mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 07:50:23 +01:00
config disable images
This commit is contained in:
parent
71a101fd99
commit
1b211568c0
4
post.php
4
post.php
@ -332,7 +332,7 @@ if (isset($_POST['delete'])) {
|
||||
}
|
||||
|
||||
// Check for a file
|
||||
if ($post['op'] && !isset($post['no_longer_require_an_image_for_op'])) {
|
||||
if ($post['op'] && !$config['disable_images'] && !isset($post['no_longer_require_an_image_for_op'])) {
|
||||
if (!isset($_FILES['file']['tmp_name']) || $_FILES['file']['tmp_name'] == '' && $config['force_image_op'])
|
||||
error($config['error']['noimage']);
|
||||
}
|
||||
@ -342,7 +342,7 @@ if (isset($_POST['delete'])) {
|
||||
$post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email']));
|
||||
$post['body'] = $_POST['body'];
|
||||
$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']) || (isset($_FILES['file']) && $_FILES['file']['tmp_name'] != ''));
|
||||
$post['has_file'] = !isset($post['embed']) && !$config['disable_images'] && (($post['op'] && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || (isset($_FILES['file']) && $_FILES['file']['tmp_name'] != ''));
|
||||
|
||||
if ($post['has_file'])
|
||||
$post['filename'] = urldecode(get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name']);
|
||||
|
@ -430,4 +430,10 @@ form.ban-appeal {
|
||||
}
|
||||
form.ban-appeal textarea {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.MathJax_Display {
|
||||
display:inline!important
|
||||
}
|
||||
pre {
|
||||
margin:0
|
||||
}
|
||||
|
@ -67,6 +67,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if not config.disable_images %}
|
||||
<tr>
|
||||
<th>
|
||||
{% trans %}File{% endtrans %}
|
||||
@ -83,6 +84,7 @@
|
||||
{{ antibot.html() }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if config.enable_embedding %}
|
||||
<tr>
|
||||
<th>
|
||||
|
Loading…
Reference in New Issue
Block a user