1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-29 17:41:52 +00:00

prefs: rudimentary multiple keyword search

This commit is contained in:
Andrew Dolgov
2009-10-07 15:12:21 +04:00
parent 4b67e71e7d
commit 1638fc4e13
4 changed files with 56 additions and 12 deletions

View File

@@ -138,7 +138,19 @@
value=\"".__('Create label')."\"></div>";
if ($label_search) {
$label_search_query = "caption LIKE '%$label_search%' AND";
$label_search = split(" ", $label_search);
$tokens = array();
foreach ($label_search as $token) {
$token = trim($token);
array_push($tokens, "(UPPER(caption) LIKE UPPER('%$token%'))");
}
$label_search_query = "(" . join($tokens, " AND ") . ") AND ";
} else {
$label_search_query = "";
}