mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/14285] Use route service for download routes
PHPBB3-14285
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
use phpbb\controller\helper;
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -36,6 +39,9 @@ class acp_users
|
||||
global $phpbb_dispatcher, $request;
|
||||
global $phpbb_container, $phpbb_log;
|
||||
|
||||
/** @var helper $controller_helper */
|
||||
$controller_helper = $phpbb_container->get('controller.helper');
|
||||
|
||||
$user->add_lang(array('posting', 'ucp', 'acp/users'));
|
||||
$this->tpl_name = 'acp_users';
|
||||
|
||||
@@ -2123,9 +2129,6 @@ class acp_users
|
||||
$decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_flags);
|
||||
}
|
||||
|
||||
/** @var \phpbb\controller\helper $controller_helper */
|
||||
$controller_helper = $phpbb_container->get('controller.helper');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SIGNATURE' => true,
|
||||
|
||||
@@ -2295,7 +2298,7 @@ class acp_users
|
||||
|
||||
'S_IN_MESSAGE' => $row['in_message'],
|
||||
|
||||
'U_DOWNLOAD' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'mode=view&id=' . $row['attach_id']),
|
||||
'U_DOWNLOAD' => $controller_helper->route('phpbb_storage_attachment', ['id' => (int) $row['attach_id']]),
|
||||
'U_VIEW_TOPIC' => $view_topic)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user