diff options
author | Joas Schilling <coding@schilljs.com> | 2020-09-15 09:20:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-09-15 09:20:10 +0200 |
commit | d37bd2cbabbe780fdf6f0ecf113336732f7de16c (patch) | |
tree | 97bb8af8df3ce1916b75071ffe0f562974b2dcfc /apps/files/lib | |
parent | a8d9b22beba9701c5b8b5c8b0f565ada087ec3f9 (diff) | |
download | nextcloud-server-d37bd2cbabbe780fdf6f0ecf113336732f7de16c.tar.gz nextcloud-server-d37bd2cbabbe780fdf6f0ecf113336732f7de16c.zip |
Use absolute URLs on search results for the clients
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Search/FilesSearchProvider.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Search/FilesSearchProvider.php b/apps/files/lib/Search/FilesSearchProvider.php index 79ea4aa89f7..e0f421d401d 100644 --- a/apps/files/lib/Search/FilesSearchProvider.php +++ b/apps/files/lib/Search/FilesSearchProvider.php @@ -97,14 +97,14 @@ class FilesSearchProvider implements IProvider { array_map(function (FileResult $result) { // Generate thumbnail url $thumbnailUrl = $result->has_preview - ? $this->urlGenerator->linkToRoute('core.Preview.getPreviewByFileId', ['x' => 32, 'y' => 32, 'fileId' => $result->id]) + ? $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', ['x' => 32, 'y' => 32, 'fileId' => $result->id]) : ''; return new SearchResultEntry( $thumbnailUrl, $result->name, $this->formatSubline($result), - $result->link, + $this->urlGenerator->getAbsoluteURL($result->link), $result->type === 'folder' ? 'icon-folder' : $this->mimeTypeDetector->mimeTypeIcon($result->mime_type) ); }, $this->fileSearch->search($query->getTerm())) |