Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2022-01-17 12:39:59 +0300
committerGitHub <noreply@github.com>2022-01-17 12:39:59 +0300
commitd316e5a49bfe49bb1738bb34b2e9ba66d7e0ef15 (patch)
tree847f1e10cc1ba6916e75a36f65da6c5aea0d116f
parentfcb82f6d429d060bb25491e5ff70666dc845aa66 (diff)
parentb165aa73678b2d2c0006b482ecf216c5318581a3 (diff)
Merge pull request #30690 from nextcloud/backport/30645/stable22
[stable22] New Files internal link GET param to avoid opening the file
-rw-r--r--apps/files/lib/Controller/ViewController.php4
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]));
}