From b88917afd43c2ea34554f00128e0d5ece9f4d4cc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 18 Nov 2005 14:37:16 +0100 Subject: [PATCH] misc uid-awareness bugfixes in getFeedCounters and outputFeedList --- backend.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend.php b/backend.php index 36d1a66e..4b10cbdb 100644 --- a/backend.php +++ b/backend.php @@ -125,7 +125,7 @@ $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)) { @@ -212,9 +212,10 @@ $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"]; -- 2.39.5