diff options
author | MichaIng <micha@dietpi.com> | 2022-01-15 04:50:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-15 04:50:26 +0300 |
commit | 78f38493ba4452b0e6e7bfe2860a38028773dd06 (patch) | |
tree | 0fa015c4964d56c5eed0880eef24d40a03b70afa | |
parent | 9f7c05cf4f159e8547e56499562ba4892214078c (diff) | |
parent | 55dd10accac44eb7c71dedda09b605f6b7b7cf8f (diff) |
Merge pull request #30689 from nextcloud/backport/30645/stable23
[stable23] New Files internal link GET param to avoid opening the file
-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])); } |