summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSkyREgit <[email protected]>2015-03-05 15:26:10 +0200
committerSkyREgit <[email protected]>2015-03-05 15:26:10 +0200
commit95a95b0a404705695184e21b15ca6dfc3adb92c4 (patch)
tree7bd02bbe142234025512a320e598bf5d57de3eb8 /include
parentf27e174d63dd415d1416e34a8b740d6e52e9d12b (diff)
Add unread category to build-in Search
unread:{true,false} - match only unread or read articles
Diffstat (limited to 'include')
-rw-r--r--include/functions2.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 6d02d01e0..278c0f3ee 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -360,6 +360,19 @@
if (!$not) array_push($search_words, $k);
}
break;
+ case "unread":
+ if ($commandpair[1]) {
+ if ($commandpair[1] == "true")
+ array_push($query_keywords, "($not (unread = true))");
+ else
+ array_push($query_keywords, "($not (unread = false))");
+
+ } else {
+ array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER('%$k%')
+ OR UPPER(ttrss_entries.content) $not LIKE UPPER('%$k%'))");
+ if (!$not) array_push($search_words, $k);
+ }
+ break;
default:
if (strpos($k, "@") === 0) {