mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 19:08:53 +00:00
[ticket/14771] Use twig syntax and short array
PHPBB3-14771
This commit is contained in:
parent
4bacbdd2a3
commit
298edde4b1
2 changed files with 8 additions and 8 deletions
|
@ -1319,11 +1319,11 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
|
||||||
// Audio files
|
// Audio files
|
||||||
case ATTACHMENT_CATEGORY_AUDIO:
|
case ATTACHMENT_CATEGORY_AUDIO:
|
||||||
$inline_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
|
$inline_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
|
||||||
$block_array += array(
|
$block_array += [
|
||||||
'S_AUDIO_FILE' => true,
|
'S_AUDIO_FILE' => true,
|
||||||
'U_FORUM' => generate_board_url(),
|
'U_FORUM' => generate_board_url(),
|
||||||
'ATTACH_ID' => $attachment['attach_id'],
|
'ATTACH_ID' => $attachment['attach_id'],
|
||||||
);
|
];
|
||||||
|
|
||||||
// Heard File ... update the download count
|
// Heard File ... update the download count
|
||||||
$update_count_ary[] = $attachment['attach_id'];
|
$update_count_ary[] = $attachment['attach_id'];
|
||||||
|
|
|
@ -29,18 +29,18 @@
|
||||||
</dl>
|
</dl>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF _file.S_AUDIO_FILE -->
|
{% if _file.S_AUDIO_FILE %}
|
||||||
<dl class="file">
|
<dl class="file">
|
||||||
<dt><!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF --><a class="postlink" href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a></dt>
|
<dt>{% if _file.UPLOAD_ICON %}{{ _file.UPLOAD_ICON }} {% endif %}<a class="postlink" href="{{ _file.U_DOWNLOAD_LINK }}">{{ _file.DOWNLOAD_NAME }}</a></dt>
|
||||||
<!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF -->
|
{% if _file.COMMENT %}<dd><em>{{ _file.COMMENT }}</em></dd>{% endif %}
|
||||||
<dd>{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>
|
<dd>{{ _file.DOWNLOAD_NAME }} ({{ _file.FILESIZE }} {{ _file.SIZE_LANG }}) {{ _file.L_DOWNLOAD_COUNT }}</dd>
|
||||||
<dd>
|
<dd>
|
||||||
<audio controls="controls" preload="none" style="max-width:100%;width:360px">
|
<audio controls="controls" preload="none" style="max-width:100%;width:360px">
|
||||||
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
|
<source src="{{ _file.U_DOWNLOAD_LINK }}" type="{{ _file.MIMETYPE }}">
|
||||||
</audio>
|
</audio>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- ENDIF -->
|
{% endif %}
|
||||||
|
|
||||||
<!-- EVENT attachment_file_append -->
|
<!-- EVENT attachment_file_append -->
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue