Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions apps/files/lib/Search/FilesSearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,12 @@ public function search(IUser $user, ISearchQuery $query): SearchResult {
// 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(
Expand Down