]> git.wh0rd.org - tt-rss.git/commitdiff
Merge pull request #439 from SkyREgit/patch-1
authorAndrew Dolgov <gothfox@users.noreply.github.com>
Thu, 5 Mar 2015 13:38:08 +0000 (16:38 +0300)
committerAndrew Dolgov <gothfox@users.noreply.github.com>
Thu, 5 Mar 2015 13:38:08 +0000 (16:38 +0300)
Add unread category to build-in Search

include/functions2.php

index 6d02d01e0407cb3cefe354d636a339181d66d3dc..278c0f3eeba2d56e55b252ed7ac08823a6938932 100644 (file)
                                        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%'))");