From 95a95b0a404705695184e21b15ca6dfc3adb92c4 Mon Sep 17 00:00:00 2001 From: SkyREgit Date: Thu, 5 Mar 2015 15:26:10 +0200 Subject: [PATCH] Add unread category to build-in Search unread:{true,false} - match only unread or read articles --- include/functions2.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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%'))"); -- 2.39.5