From: Andrew Dolgov Date: Thu, 17 Nov 2005 18:04:38 +0000 (+0100) Subject: backend.php uid-awareness work X-Git-Tag: schema_feature_freeze_for_1.1~251 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4356293a66c5723da19fc42a7714f7c9d720470f;p=tt-rss.git backend.php uid-awareness work --- diff --git a/backend.php b/backend.php index 956ff2e4..810097a4 100644 --- a/backend.php +++ b/backend.php @@ -1,11 +1,7 @@ "; } @@ -55,9 +59,11 @@ function getTagCounters($link) { $result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count FROM ttrss_tags,ttrss_entries WHERE + ttrss_tags.owner_uid = ".$_SESSION["uid"]." AND post_id = ttrss_entries.id AND unread = true GROUP BY tag_name UNION - select tag_name,0 as count FROM ttrss_tags"); + select tag_name,0 as count FROM ttrss_tags + WHERE ttrss_tags.owner_uid = ".$_SESSION["uid"]); $tags = array(); @@ -76,14 +82,14 @@ function getLabelCounters($link) { $result = db_query($link, "SELECT count(id) as count FROM ttrss_entries - WHERE marked = true AND unread = true"); + WHERE marked = true AND unread = true AND owner_uid = ".$_SESSION["uid"]); $count = db_fetch_result($result, 0, "count"); print "