From 55dd10accac44eb7c71dedda09b605f6b7b7cf8f Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Thu, 13 Jan 2022 13:07:52 +0100 Subject: [PATCH] [files] new internal link GET param to avoid setting 'openfile' on redirect Signed-off-by: Julien Veyssier --- apps/files/lib/Controller/ViewController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 856f8d67d498e..fd84998769ddf 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -162,10 +162,10 @@ protected function getStorageInfo() { * @return TemplateResponse|RedirectResponse * @throws NotFoundException */ - public function showFile(string $fileid = null): Response { + public function showFile(string $fileid = null, int $openfile = 1): Response { // This is the entry point from the `/f/{fileid}` URL which is hardcoded in the server. try { - return $this->redirectToFile($fileid, true); + return $this->redirectToFile($fileid, $openfile !== 0); } catch (NotFoundException $e) { return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true])); }