diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-01-07 14:28:34 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-01-14 11:32:25 +0300 |
commit | 290915d70b91400869e0735fe9cff4fb68ca4113 (patch) | |
tree | 980ea638374708773315aed8b1df564072d23927 /apps | |
parent | e0352ae684a6d8c8ef2cdc7d2a2b2e71cca0c029 (diff) |
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( |