From: SkyREgit Date: Thu, 5 Mar 2015 13:26:10 +0000 (+0200) Subject: Add unread category to build-in Search X-Git-Tag: 16.3~349^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=95a95b0a404705695184e21b15ca6dfc3adb92c4;p=tt-rss.git Add unread category to build-in Search unread:{true,false} - match only unread or read articles --- diff --git a/include/functions2.php b/include/functions2.php index 6d02d01e..278c0f3e 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -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%'))");