diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-04-01 12:17:37 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-25 15:51:12 +0200 |
commit | 7d86f40bdb2135655b5b4fe8cbcc1ac102114f86 (patch) | |
tree | c70ac4ad89a4fc84b8e52114aca7d9755cc92086 /application/FeedBuilder.php | |
parent | b64d83cd2b60b6851741787f8ce2ae2c93092841 (diff) | |
download | Shaarli-7d86f40bdb2135655b5b4fe8cbcc1ac102114f86.tar.gz Shaarli-7d86f40bdb2135655b5b4fe8cbcc1ac102114f86.tar.zst Shaarli-7d86f40bdb2135655b5b4fe8cbcc1ac102114f86.zip |
Empty tag search will look for not tagged links
Fixes #784
From now, searching for tags with an empty value will return only not tagged links,
with the search bar showing `x results [not tagged]`.
Note that using the api, the searchtags request parameter must be set to `false` to get the same result.
- [ ] Update API doc
Diffstat (limited to 'application/FeedBuilder.php')
-rw-r--r-- | application/FeedBuilder.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index a1f4da48..7377bcec 100644 --- a/application/FeedBuilder.php +++ b/application/FeedBuilder.php | |||
@@ -97,6 +97,11 @@ class FeedBuilder | |||
97 | */ | 97 | */ |
98 | public function buildData() | 98 | public function buildData() |
99 | { | 99 | { |
100 | // Search for untagged links | ||
101 | if (isset($this->userInput['searchtags']) && empty($this->userInput['searchtags'])) { | ||
102 | $this->userInput['searchtags'] = false; | ||
103 | } | ||
104 | |||
100 | // Optionally filter the results: | 105 | // Optionally filter the results: |
101 | $linksToDisplay = $this->linkDB->filterSearch($this->userInput); | 106 | $linksToDisplay = $this->linkDB->filterSearch($this->userInput); |
102 | 107 | ||