]> git.wh0rd.org Git - tt-rss.git/commitdiff
getLabelUnread: ignore hidden feeds
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 09:41:35 +0000 (10:41 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 09:41:35 +0000 (10:41 +0100)
functions.php

index 8a4fc6b4ce9a5336bcd46d20b0b5d08cf5c398b1..2f7f5e9d75c5d4b755c777ad4528afab51b2832f 100644 (file)
 
                $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) {