summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 10:41:35 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 10:41:35 +0100
commitb0f24af1da792712ebf801d1cc77d3c9bb8bd448 (patch)
tree0fc8d7cbb15edbabab3fff886bde8edae1eac699 /functions.php
parent810b15613569fcc92b40ada16b32d90f840e2d8a (diff)
getLabelUnread: ignore hidden feeds
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 8a4fc6b4c..2f7f5e9d7 100644
--- a/functions.php
+++ b/functions.php
@@ -2406,10 +2406,10 @@
$result = db_query($link, "
SELECT COUNT(unread) AS unread FROM
- ttrss_user_entries, ttrss_labels2, ttrss_user_labels2
- WHERE label_id = id AND article_id = ref_id AND
- ttrss_labels2.owner_uid = '$owner_uid' AND id = '$label_id'
- AND unread = true
+ ttrss_user_entries, ttrss_labels2, ttrss_user_labels2, ttrss_feeds
+ WHERE label_id = ttrss_labels2.id AND article_id = ref_id AND
+ ttrss_labels2.owner_uid = '$owner_uid' AND ttrss_labels2.id = '$label_id'
+ AND unread = true AND hidden = false AND feed_id = ttrss_feeds.id
AND ttrss_user_entries.owner_uid = '$owner_uid'");
if (db_num_rows($result) != 0) {