From 6232401dd73344f8d3e2794cd2bda95254fdc60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Sat, 14 Jul 2018 12:06:01 +0200 Subject: [PATCH] [ticket/14285] Rename argument from file to id PHPBB3-14285 --- phpBB/config/default/routing/storage.yml | 4 ++-- phpBB/download/file.php | 2 +- phpBB/phpbb/storage/controller/attachment.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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);