1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-03 15:29:12 +01:00

[ticket/15671] Load extensions from a variable instead of harcode it

PHPBB3-15671
This commit is contained in:
Rubén Calvo 2018-05-27 00:06:17 +02:00 committed by Marc Alexander
parent 4ff986f578
commit dc397755d5
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<dl>
<dt><label for="avatar_upload_file">{L_UPLOAD_AVATAR_FILE}{L_COLON}</label></dt>
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" accept=".gif,.jpg,.jpeg,.png" /></dd>
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" accept="{% for EXTENSION in AVATAR_ALLOWED_EXTENSIONS %}.{{ EXTENSION }}{% if not loop.last %},{% endif %}{% endfor %}" /></dd>
</dl>
<!-- IF S_UPLOAD_AVATAR_URL -->

View File

@ -84,6 +84,7 @@ class upload extends \phpbb\avatar\driver\driver
$template->assign_vars(array(
'S_UPLOAD_AVATAR_URL' => ($this->config['allow_avatar_remote_upload']) ? true : false,
'AVATAR_UPLOAD_SIZE' => $this->config['avatar_filesize'],
'AVATAR_ALLOWED_EXTENSIONS' => $this->allowed_extensions,
));
return true;

View File

@ -1,6 +1,6 @@
<dl>
<dt><label for="avatar_upload_file">{L_UPLOAD_AVATAR_FILE}{L_COLON}</label></dt>
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" accept=".gif,.jpg,.jpeg,.png" /></dd>
<dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" accept="{% for EXTENSION in AVATAR_ALLOWED_EXTENSIONS %}.{{ EXTENSION }}{% if not loop.last %},{% endif %}{% endfor %}" /></dd>
</dl>
<!-- IF S_UPLOAD_AVATAR_URL -->