diff options
Diffstat (limited to 'apps/files')
-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( |