diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-01-07 12:28:34 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-01-13 18:26:07 +0100 |
commit | 8d3a4856cbee12f66c0e3a8f0c0e307277c31543 (patch) | |
tree | ca03fd1797ff17315cd2016ce60ebf85eb6540c6 /apps | |
parent | a7811334370b735427d41a953abd53ec5648ab59 (diff) | |
download | nextcloud-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.php | 11 |
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( |