mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06: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:
@@ -1112,7 +1112,13 @@ class acp_attachments
|
||||
'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']),
|
||||
'ATTACH_ID' => $row['attach_id'],
|
||||
'POST_ID' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
|
||||
'U_FILE' => $this->controller_helper->route('phpbb_storage_attachment', ['file' => (int) $row['attach_id']])
|
||||
'U_FILE' => $this->controller_helper->route(
|
||||
'phpbb_storage_attachment',
|
||||
[
|
||||
'file' => (int) $row['attach_id'],
|
||||
'filename' => $row['real_filename'],
|
||||
]
|
||||
),
|
||||
]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@@ -1302,7 +1308,13 @@ class acp_attachments
|
||||
'S_IN_MESSAGE' => (bool) $row['in_message'],
|
||||
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
|
||||
'U_FILE' => $this->controller_helper->route('phpbb_storage_attachment', ['file' => $row['attach_id']])
|
||||
'U_FILE' => $this->controller_helper->route(
|
||||
'phpbb_storage_attachment',
|
||||
[
|
||||
'file' => $row['attach_id'],
|
||||
'filename' => $row['real_filename'],
|
||||
]
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user