diff --git a/phpBB/config/default/routing/storage.yml b/phpBB/config/default/routing/storage.yml index 03ffb0ad16..069180148d 100644 --- a/phpBB/config/default/routing/storage.yml +++ b/phpBB/config/default/routing/storage.yml @@ -4,8 +4,8 @@ phpbb_storage_avatar: _controller: storage.controller.avatar:handle phpbb_storage_attachment: - path: /download/attachment/{file} + path: /download/attachment/{id} defaults: _controller: storage.controller.attachment:handle requirements: - file: \d+ + id: \d+ diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 2a4e3edac1..da4e432f0e 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -47,7 +47,7 @@ $thumbnail = $request->variable('t', false); $response = new RedirectResponse( $controller_helper->route('phpbb_storage_attachment', array( - 'file' => $attach_id, + 'id' => $attach_id, 'mode' => $mode, 't' => $thumbnail, ), false), diff --git a/phpBB/phpbb/storage/controller/attachment.php b/phpBB/phpbb/storage/controller/attachment.php index cdba6b6d83..a6943b9b78 100644 --- a/phpBB/phpbb/storage/controller/attachment.php +++ b/phpBB/phpbb/storage/controller/attachment.php @@ -59,9 +59,9 @@ class attachment extends controller $this->user = $user; } - public function handle($file) + public function handle($id) { - $attach_id = (int) $file; + $attach_id = (int) $id; $mode = $this->request->variable('mode', ''); $thumbnail = $this->request->variable('t', false);