]> git.wh0rd.org Git - tt-rss.git/commitdiff
make label category browseable
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 18:03:07 +0000 (19:03 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 18:03:07 +0000 (19:03 +0100)
functions.php

index 8e60ad80fac6b68bb1c6903f47a0a653edcd5129..f1e9bb1f2839a9bf499c16ab8f1af7c536b6a3ee 100644 (file)
                        } else if ($feed == -1) { // starred virtual feed
                                $query_strategy_part = "marked = true";
                                $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
-                       } else if ($feed == -2) { // published virtual feed
-                               $query_strategy_part = "published = true";
-                               $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
+                       } else if ($feed == -2) { // published virtual feed OR labels category
+
+                               if (!$cat_view) {
+                                       $query_strategy_part = "published = true";
+                                       $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
+                               } else {
+                                       $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
+
+                                       $ext_tables_part = ",ttrss_labels2,ttrss_user_labels2";
+       
+                                       $query_strategy_part = "ttrss_labels2.id = ttrss_user_labels2.label_id AND
+                                               ttrss_user_labels2.article_id = ref_id";
+
+                               }
+
                        } else if ($feed == -3) { // fresh virtual feed
                                $query_strategy_part = "unread = true";
 
                                                        $cat_hidden = false;
                                                }
 
-                                               printCategoryHeader($link, -2, $cat_hidden, false);
+                                               printCategoryHeader($link, -2, $cat_hidden, true);
 
                                        } else {
                                                print "<li><hr></li>";