]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): When redirecting to a file (internal link) then it should open by default 47023/head
authorFerdinand Thiessen <opensource@fthiessen.de>
Sat, 3 Aug 2024 11:53:53 +0000 (13:53 +0200)
committerFerdinand Thiessen <opensource@fthiessen.de>
Mon, 5 Aug 2024 14:40:08 +0000 (16:40 +0200)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files/lib/Controller/ViewController.php

index a6f9f48673eda4c36eb46a425beb193cb19e4ee2..9722e2aadb0f8c091ccf0cebb2c45d4c327659a7 100644 (file)
@@ -391,6 +391,8 @@ class ViewController extends Controller {
                        } else {
                                // set parent path as dir
                                $params['dir'] = $baseFolder->getRelativePath($node->getParent()->getPath());
+                               // open the file by default (opening the viewer)
+                               $params['openfile'] = 'true';
                        }
                        return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params));
                }