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/Utils.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/Utils.php')
-rw-r--r-- | application/Utils.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/Utils.php b/application/Utils.php index 5c077450..87e5cc8f 100644 --- a/application/Utils.php +++ b/application/Utils.php | |||
@@ -91,6 +91,10 @@ function endsWith($haystack, $needle, $case = true) | |||
91 | */ | 91 | */ |
92 | function escape($input) | 92 | function escape($input) |
93 | { | 93 | { |
94 | if (is_bool($input)) { | ||
95 | return $input; | ||
96 | } | ||
97 | |||
94 | if (is_array($input)) { | 98 | if (is_array($input)) { |
95 | $out = array(); | 99 | $out = array(); |
96 | foreach($input as $key => $value) { | 100 | foreach($input as $key => $value) { |