Merge pull request #30665 from nextcloud/backport/30530/stable21

pull/30726/head
John Molakvoæ 2022-01-16 12:01:18 +07:00 committed by GitHub
commit f3df26e22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

@ -118,12 +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(),
]
'files.View.showFile',
['fileid' => $result->getId()]
);
$searchResultEntry = new SearchResultEntry(