]> git.wh0rd.org Git - tt-rss.git/commitdiff
pref-feeds: disable show empty cats when searching
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 13 Sep 2012 08:54:11 +0000 (12:54 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 13 Sep 2012 08:54:11 +0000 (12:54 +0400)
classes/pref/feeds.php

index 77622d533e4a43b5fbe375a9e15137d2ca73eea5..9dc2f7e6a33c9f20c22fbe4236cbdaed93b188cc 100644 (file)
@@ -29,7 +29,7 @@ class Pref_Feeds extends Handler_Protected {
 
                if ($search) $search_qpart = " AND LOWER(title) LIKE LOWER('%$search%')";
 
-               $show_empty_cats = $_REQUEST['mode'] != 2 &&
+               $show_empty_cats = $_REQUEST['mode'] != 2 && !$search &&
                        get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS');
 
                $items = array();
@@ -150,7 +150,7 @@ class Pref_Feeds extends Handler_Protected {
                }
 
                if ($enable_cats) {
-                       $show_empty_cats = $_REQUEST['mode'] != 2 &&
+                       $show_empty_cats = $_REQUEST['mode'] != 2 && !$search &&
                                get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS');
 
                        $result = db_query($this->link, "SELECT id, title, collapsed FROM ttrss_feed_categories