aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-07 12:28:34 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-13 18:26:07 +0100
commit8d3a4856cbee12f66c0e3a8f0c0e307277c31543 (patch)
treeca03fd1797ff17315cd2016ce60ebf85eb6540c6 /apps
parenta7811334370b735427d41a953abd53ec5648ab59 (diff)
downloadnextcloud-server-8d3a4856cbee12f66c0e3a8f0c0e307277c31543.tar.gz
nextcloud-server-8d3a4856cbee12f66c0e3a8f0c0e307277c31543.zip
Fix wrong unified search link to folder
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/Search/FilesSearchProvider.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files/lib/Search/FilesSearchProvider.php b/apps/files/lib/Search/FilesSearchProvider.php
index 2361b8a2d07..ba2d4bafa30 100644
--- a/apps/files/lib/Search/FilesSearchProvider.php
+++ b/apps/files/lib/Search/FilesSearchProvider.php
@@ -118,13 +118,12 @@ class FilesSearchProvider implements IProvider {
// Generate thumbnail url
$thumbnailUrl = $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', ['x' => 32, 'y' => 32, 'fileId' => $result->getId()]);
$path = $userFolder->getRelativePath($result->getPath());
+
+ // Use shortened link to centralize the various
+ // files/folder url redirection in files.View.showFile
$link = $this->urlGenerator->linkToRoute(
- 'files.view.index',
- [
- 'dir' => dirname($path),
- 'scrollto' => $result->getName(),
- 'openfile' => $result->getId(),
- ]
+ 'files.View.showFile',
+ ['fileid' => $result->getId()]
);
$searchResultEntry = new SearchResultEntry(