1
0
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:
8chan Admin 2013-10-27 23:27:23 +00:00
parent 71a101fd99
commit 1b211568c0
3 changed files with 11 additions and 3 deletions

View File

@ -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']);

View File

@ -430,4 +430,10 @@ form.ban-appeal {
}
form.ban-appeal textarea {
display: block;
}
}
.MathJax_Display {
display:inline!important
}
pre {
margin:0
}

View File

@ -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>