From 2923a53671e1eb438fd1301cb0a0154d113467a9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 18 Jan 2009 10:45:07 +0100 Subject: [PATCH] getLabelCounters: ignore hidden feeds --- functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 2f7f5e9d..f18bdbce 100644 --- a/functions.php +++ b/functions.php @@ -2646,12 +2646,14 @@ $owner_uid = $_SESSION["uid"]; $result = db_query($link, - "SELECT id, caption, COUNT(unread) AS unread FROM ttrss_labels2 - LEFT JOIN ttrss_user_labels2 ON (label_id = id) + "SELECT ttrss_labels2.id, caption, COUNT(unread) AS unread FROM ttrss_labels2 + LEFT JOIN ttrss_user_labels2 ON (label_id = ttrss_labels2.id) LEFT JOIN ttrss_user_entries ON (ref_id = article_id AND unread = true AND - ttrss_user_entries.owner_uid = '$owner_uid') - WHERE ttrss_labels2.owner_uid = '$owner_uid' + ttrss_user_entries.owner_uid = '$owner_uid'),ttrss_feeds + WHERE ttrss_feeds.id = feed_id AND + hidden = false AND + ttrss_labels2.owner_uid = '$owner_uid' GROUP BY id, caption"); while ($line = db_fetch_assoc($result)) { -- 2.39.5