diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-07-18 01:34:26 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-07-18 01:34:26 +0300 |
commit | 167f4c4b9399fc61987c86e8c1a8d184a806420e (patch) | |
tree | dafaa59b807d10d657dd552972871da36e2c7f8e | |
parent | 00144e7f01310be85e9e1d212dca7e3fadb39a7a (diff) |
1.3.5
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | js/fulltextsearch.v1.navigation.js | 18 | ||||
-rw-r--r-- | lib/Model/SearchRequest.php | 13 |
5 files changed, 35 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c5bfe2..e858f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 1.3.5 + +- ignore live index on cron +- live can be run as a service +- simple queries ### 1.3.4 @@ -10,7 +10,7 @@ cert_dir=$(HOME)/.nextcloud/certificates github_account=nextcloud branch=master codecov_token_dir=$(HOME)/.nextcloud/codecov_token -version+=1.3.4 +version+=1.3.5 all: appstore diff --git a/appinfo/info.xml b/appinfo/info.xml index ecc56e7..5ef655e 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -10,7 +10,7 @@ Core App of the full-text search framework for your Nextcloud. ]]> </description> - <version>1.3.4</version> + <version>1.3.5</version> <licence>agpl</licence> <author>Maxence Lange</author> <namespace>FullTextSearch</namespace> diff --git a/js/fulltextsearch.v1.navigation.js b/js/fulltextsearch.v1.navigation.js index 3be94bb..ed1c8f2 100644 --- a/js/fulltextsearch.v1.navigation.js +++ b/js/fulltextsearch.v1.navigation.js @@ -68,8 +68,22 @@ var nav = { divProviderNavigation.attr('data-total', meta.total); var providerTitle = divProviderNavigation.attr('data-provider-title'); - var left = "the search in " + providerTitle + " for '" + request.search + "' returned " + - meta.total + " results in " + meta.time + "ms"; + var left = ''; + var data = + { + title: providerTitle, + search: request.search, + total: meta.total, + time: meta.time + }; + + if (request.search === ':null') { + left = t('fulltextsearch', 'the search returned {total} results in {time} ms', data); + } else { + left = t('fulltextsearch', + "the search in {title} for '{search}' returned {total} results in {time} ms", data); + } + divProviderNavigation.find('.provider_navigation_left').text(left); if (maxPage > 1) { diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php index 3a4d819..1c4fe43 100644 --- a/lib/Model/SearchRequest.php +++ b/lib/Model/SearchRequest.php @@ -163,6 +163,17 @@ class SearchRequest implements ISearchRequest, JsonSerializable { return $this; } + /** + * @param string $search + * + * @return ISearchRequest + */ + public function addSearch(string $search): ISearchRequest { + $this->search .= ' ' . $search; + + return $this; + } + /** * @@ -192,7 +203,7 @@ class SearchRequest implements ISearchRequest, JsonSerializable { * @return bool */ private function searchQueryOptions(string $word): bool { - if (($pos = strpos($word, ':')) === false) { + if (($pos = strpos($word, ':')) === false || $pos === 0) { return false; } |