1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-12 04:36:32 +02:00

[ticket/15687] Add attachment filename to attachment URL

This will also fix the invalid requirements for the file parameter of the URL.

PHPBB3-15687
This commit is contained in:
Marc Alexander
2023-06-27 21:00:16 +02:00
parent d73b60781e
commit df6ab1a811
7 changed files with 68 additions and 11 deletions

View File

@ -868,7 +868,14 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
$hidden .= '<input type="hidden" name="attachment_data[' . $count . '][' . $key . ']" value="' . $value . '" />';
}
$download_link = $phpbb_container->get('controller.helper')->route('phpbb_storage_attachment', ['file' => (int) $attach_row['attach_id']]);
$download_link = $phpbb_container->get('controller.helper')
->route(
'phpbb_storage_attachment',
[
'file' => (int) $attach_row['attach_id'],
'filename' => $attachment['real_filename'],
]
);
$attachrow_template_vars[(int) $attach_row['attach_id']] = array(
'FILENAME' => utf8_basename($attach_row['real_filename']),