diff options
author | Andrew Dolgov <[email protected]> | 2006-08-16 13:53:04 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-08-16 13:53:04 +0100 |
commit | 3831db41c4b24050ad0ef2d0b58a5a042d4313bb (patch) | |
tree | 10cb37ba2616d84124d8e8f97c031e6fe26e7ea0 /functions.php | |
parent | cfb0213179a02b0076cbce46fd154fe1ff3e414a (diff) |
fix getGlobalCounters re hidden feeds
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 81da7256c..5a0e75c18 100644 --- a/functions.php +++ b/functions.php @@ -1553,10 +1553,12 @@ /* FIXME this needs reworking */ function getGlobalUnread($link) { - $result = db_query($link, "SELECT count(id) as c_id FROM ttrss_entries,ttrss_user_entries + $result = db_query($link, "SELECT count(ttrss_entries.id) as c_id FROM ttrss_entries,ttrss_user_entries,ttrss_feeds WHERE unread = true AND + ttrss_user_entries.feed_id = ttrss_feeds.id AND ttrss_user_entries.ref_id = ttrss_entries.id AND - owner_uid = " . $_SESSION["uid"]); + hidden = false AND + ttrss_user_entries.owner_uid = " . $_SESSION["uid"]); $c_id = db_fetch_result($result, 0, "c_id"); return $c_id; } |