aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-01-14 17:54:02 +0100
committerGitHub <noreply@github.com>2022-01-14 17:54:02 +0100
commit206967a4fbf217a4ec69bb8438194e5a40e1cf12 (patch)
tree6e7e7086525de1aa61aa23c34d28e51a6cd33538
parent6556508733ae2b4b050d0f1f2cdfdc32a7af0ecc (diff)
parentb67b4b160b7f871888a43df4ffd9eed67db0dad3 (diff)
downloadnextcloud-server-206967a4fbf217a4ec69bb8438194e5a40e1cf12.tar.gz
nextcloud-server-206967a4fbf217a4ec69bb8438194e5a40e1cf12.zip
Merge pull request #30645 from nextcloud/enh/internal-link-scroll-only
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 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]));
}