diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2022-01-13 15:07:52 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-01-14 20:01:50 +0300 |
commit | b165aa73678b2d2c0006b482ecf216c5318581a3 (patch) | |
tree | 17da5ef000a005bceec118ec32d28640ba30339a /apps | |
parent | fbc10076184d692cd0bb740b12e3364cc02241a9 (diff) |
[files] new internal link GET param to avoid setting 'openfile' on redirect
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'apps')
-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 856f8d67d49..fd84998769d 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])); } |