summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 10:45:07 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 10:45:07 +0100
commit2923a53671e1eb438fd1301cb0a0154d113467a9 (patch)
treebc7f1dcb4bd332ba9891582bb45992303f8ee2e8 /functions.php
parentb0f24af1da792712ebf801d1cc77d3c9bb8bd448 (diff)
getLabelCounters: ignore hidden feeds
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 2f7f5e9d7..f18bdbce5 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)) {