]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc uid-awareness bugfixes in getFeedCounters and outputFeedList
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 18 Nov 2005 13:37:16 +0000 (14:37 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 18 Nov 2005 13:37:16 +0000 (14:37 +0100)
backend.php

index 36d1a66eea1f631bae7f66227cb4c1557d33fe22..4b10cbdbfadfa8c7f81454c312be918872b7a47b 100644 (file)
        
                $result = db_query($link, "SELECT id,
                        (SELECT count(id) FROM ttrss_entries WHERE feed_id = ttrss_feeds.id 
-                               AND unread = true) as count
+                               AND unread = true AND owner_uid = ".$_SESSION["uid"].") as count
                        FROM ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]);
        
                while ($line = db_fetch_assoc($result)) {
 
                        $result = db_query($link, "SELECT *,
                                (SELECT count(id) FROM ttrss_entries 
-                                       WHERE feed_id = ttrss_feeds.id) AS total,
+                                       WHERE feed_id = ttrss_feeds.id AND owner_uid = '$owner_uid') AS total,
                                (SELECT count(id) FROM ttrss_entries
-                                       WHERE feed_id = ttrss_feeds.id AND unread = true) as unread
+                                       WHERE feed_id = ttrss_feeds.id AND unread = true
+                                               AND owner_uid = '$owner_uid') as unread
                                FROM ttrss_feeds WHERE owner_uid = '$owner_uid' ORDER BY title");                       
        
                        $actid = $_GET["actid"];