From: Andrew Dolgov Date: Thu, 5 Mar 2015 13:38:08 +0000 (+0300) Subject: Merge pull request #439 from SkyREgit/patch-1 X-Git-Tag: 16.3~349 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=aac7067316be23362d50bcd8bf8c98f7baa8e5ce;hp=f27e174d63dd415d1416e34a8b740d6e52e9d12b;p=tt-rss.git Merge pull request #439 from SkyREgit/patch-1 Add unread category to build-in Search --- 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%'))");