diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2022-01-13 13:07:52 +0100 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2022-01-14 10:50:13 +0100 |
commit | b67b4b160b7f871888a43df4ffd9eed67db0dad3 (patch) | |
tree | 4c8184b8e9f39dc090af1305dccd8844eac61985 | |
parent | 6a7b088adb95c2afb725cae7e02f1a39a153b2d9 (diff) | |
download | nextcloud-server-b67b4b160b7f871888a43df4ffd9eed67db0dad3.tar.gz nextcloud-server-b67b4b160b7f871888a43df4ffd9eed67db0dad3.zip |
[files] new internal link GET param to avoid setting 'openfile' on redirect
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index c73e8f77a3a..bfd931c0b2a 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -162,10 +162,10 @@ class ViewController extends Controller { * @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])); } |