diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-07-19 21:38:53 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-07-19 21:38:53 +0300 |
commit | c0c3591a056991896f0e7c6fa4358f256bc6c1e2 (patch) | |
tree | ef7669dd7e9b65478248bfc10bfa870492a702ec | |
parent | 392e33791f64387215342fb8b37be3a3d9bc5978 (diff) |
compat nc17
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | js/fulltextsearch.v1.navigation.js | 2 | ||||
-rw-r--r-- | lib/Model/SearchResult.php | 20 | ||||
-rw-r--r-- | lib/Service/SearchService.php | 1 |
3 files changed, 17 insertions, 6 deletions
diff --git a/js/fulltextsearch.v1.navigation.js b/js/fulltextsearch.v1.navigation.js index ed1c8f2..c43ead4 100644 --- a/js/fulltextsearch.v1.navigation.js +++ b/js/fulltextsearch.v1.navigation.js @@ -77,7 +77,7 @@ var nav = { time: meta.time }; - if (request.search === ':null') { + if (request.search === ':null' || request.search === '') { left = t('fulltextsearch', 'the search returned {total} results in {time} ms', data); } else { left = t('fulltextsearch', diff --git a/lib/Model/SearchResult.php b/lib/Model/SearchResult.php index 11e25ce..4d0a966 100644 --- a/lib/Model/SearchResult.php +++ b/lib/Model/SearchResult.php @@ -274,13 +274,13 @@ class SearchResult implements ISearchResult, JsonSerializable { /** - * @since 15.0.0 - * * @param string $category * @param string $value * @param int $count * * @return ISearchResult + * @since 15.0.0 + * */ public function addAggregation(string $category, string $value, int $count): ISearchResult { // TODO: Implement addAggregation() method. @@ -289,11 +289,11 @@ class SearchResult implements ISearchResult, JsonSerializable { } /** - * @since 15.0.0 - * * @param string $category * * @return array + * @since 15.0.0 + * */ public function getAggregations(string $category): array { // TODO: Implement getAggregations() method. @@ -329,6 +329,7 @@ class SearchResult implements ISearchResult, JsonSerializable { 'provider' => $provider, 'platform' => $platform, 'documents' => $this->getDocuments(), + 'info' => $this->getInfosAll(), 'meta' => [ 'timedOut' => $this->isTimedOut(), @@ -340,5 +341,16 @@ class SearchResult implements ISearchResult, JsonSerializable { ]; } + public function addInfo(string $k, string $value): ISearchResult { + return $this; + } + + public function getInfo(string $k): string { + return ''; + } + + public function getInfosAll(): array { + return []; + } } diff --git a/lib/Service/SearchService.php b/lib/Service/SearchService.php index 7f0f0f8..41af21d 100644 --- a/lib/Service/SearchService.php +++ b/lib/Service/SearchService.php @@ -137,7 +137,6 @@ class SearchService implements ISearchService { * @throws ProviderDoesNotExistException */ public function search(string $userId, ISearchRequest $request): array { - $this->searchRequestCannotBeEmpty($request); if ($userId === '') { |