aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/lib/Search/FilesSearchProvider.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/lib/Search/FilesSearchProvider.php b/apps/files/lib/Search/FilesSearchProvider.php
index 5c97e771ab7..a3c6120ef13 100644
--- a/apps/files/lib/Search/FilesSearchProvider.php
+++ b/apps/files/lib/Search/FilesSearchProvider.php
@@ -110,13 +110,16 @@ class FilesSearchProvider implements IProvider {
? $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', ['x' => 32, 'y' => 32, 'fileId' => $result->id])
: '';
- return new SearchResultEntry(
+ $searchResultEntry = new SearchResultEntry(
$thumbnailUrl,
$result->name,
$this->formatSubline($result),
$this->urlGenerator->getAbsoluteURL($result->link),
$result->type === 'folder' ? 'icon-folder' : $this->mimeTypeDetector->mimeTypeIcon($result->mime_type)
);
+ $searchResultEntry->addAttribute('fileId', (string)$result->id);
+ $searchResultEntry->addAttribute('path', $result->path);
+ return $searchResultEntry;
}, $this->fileSearch->search($query->getTerm()))
);
}