[ticket/14285] Rename argument from file to id

PHPBB3-14285
This commit is contained in:
Rubén Calvo 2018-07-14 12:06:01 +02:00 committed by rubencm
parent 4abdabe6f4
commit 6232401dd7
3 changed files with 5 additions and 5 deletions

View file

@ -4,8 +4,8 @@ phpbb_storage_avatar:
_controller: storage.controller.avatar:handle _controller: storage.controller.avatar:handle
phpbb_storage_attachment: phpbb_storage_attachment:
path: /download/attachment/{file} path: /download/attachment/{id}
defaults: defaults:
_controller: storage.controller.attachment:handle _controller: storage.controller.attachment:handle
requirements: requirements:
file: \d+ id: \d+

View file

@ -47,7 +47,7 @@ $thumbnail = $request->variable('t', false);
$response = new RedirectResponse( $response = new RedirectResponse(
$controller_helper->route('phpbb_storage_attachment', array( $controller_helper->route('phpbb_storage_attachment', array(
'file' => $attach_id, 'id' => $attach_id,
'mode' => $mode, 'mode' => $mode,
't' => $thumbnail, 't' => $thumbnail,
), false), ), false),

View file

@ -59,9 +59,9 @@ class attachment extends controller
$this->user = $user; $this->user = $user;
} }
public function handle($file) public function handle($id)
{ {
$attach_id = (int) $file; $attach_id = (int) $id;
$mode = $this->request->variable('mode', ''); $mode = $this->request->variable('mode', '');
$thumbnail = $this->request->variable('t', false); $thumbnail = $this->request->variable('t', false);