Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-01-14 11:18:44 +0300
committerGitHub <noreply@github.com>2022-01-14 11:18:44 +0300
commit2c1eac665ace10a0c0a4ce0a301a515c907bdefb (patch)
treed5441c90251a8932735aed85c2fa974f09586936 /apps/files
parent6b610896ac186d9a6c3b417fcee50066a3450eec (diff)
parent8d3a4856cbee12f66c0e3a8f0c0e307277c31543 (diff)
Merge pull request #30530 from nextcloud/fix/search-url
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Search/FilesSearchProvider.php11
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(