1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:35:57 +00:00

Add unread category to build-in Search

unread:{true,false} - match only unread or read articles
This commit is contained in:
SkyREgit
2015-03-05 15:26:10 +02:00
parent f27e174d63
commit 95a95b0a40

View File

@@ -354,6 +354,19 @@
else
array_push($query_keywords, "($not (published = 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;
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%'))");