diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-01-14 09:18:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 09:18:44 +0100 |
commit | 2c1eac665ace10a0c0a4ce0a301a515c907bdefb (patch) | |
tree | d5441c90251a8932735aed85c2fa974f09586936 /apps/files/lib | |
parent | 6b610896ac186d9a6c3b417fcee50066a3450eec (diff) | |
parent | 8d3a4856cbee12f66c0e3a8f0c0e307277c31543 (diff) | |
download | nextcloud-server-2c1eac665ace10a0c0a4ce0a301a515c907bdefb.tar.gz nextcloud-server-2c1eac665ace10a0c0a4ce0a301a515c907bdefb.zip |
Merge pull request #30530 from nextcloud/fix/search-url
Diffstat (limited to 'apps/files/lib')
-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( |