Skip to content

Commit

Permalink
Merge pull request #628 from nextcloud/backport/626/stable20
Browse files Browse the repository at this point in the history
[stable20] providerId displayed in title
  • Loading branch information
ArtificialOwl authored May 6, 2021
2 parents 2b3619c + 6be89d1 commit d84415b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Search/UnifiedSearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,12 @@ private function convertSearchResult(array $searchResult): array {
foreach ($searchResult as $ftsSearch) {
foreach ($ftsSearch->getDocuments() as $document) {
$excerpts = $document->getExcerpts();
$title = '(' . $document->getProviderId() . ') ';
if (empty($excerpts)) {
$title = $document->getTitle();
$title .= $document->getTitle();
$subline = '';
} else {
$title = (sizeof($excerpts) > 0) ? $excerpts[0]['excerpt'] : '';
$title .= (sizeof($excerpts) > 0) ? $excerpts[0]['excerpt'] : '';
$subline = $document->getTitle();
}

Expand Down

0 comments on commit d84415b

Please sign in to comment.