From e6a38cdea271277f4dad3ad95cdbb465215904df Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 18 Jan 2009 19:03:07 +0100 Subject: [PATCH] make label category browseable --- functions.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 8e60ad80..f1e9bb1f 100644 --- a/functions.php +++ b/functions.php @@ -3217,9 +3217,21 @@ } 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"; @@ -4206,7 +4218,7 @@ $cat_hidden = false; } - printCategoryHeader($link, -2, $cat_hidden, false); + printCategoryHeader($link, -2, $cat_hidden, true); } else { print "

  • "; -- 2.39.5