From: Andrew Dolgov Date: Thu, 21 Dec 2006 17:29:08 +0000 (+0100) Subject: fix tag browser/rpc counters to work for users with uid != 2 X-Git-Tag: 1.2.7~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=22e007324cfa1d814a24221977f283af636cf7af;p=tt-rss.git fix tag browser/rpc counters to work for users with uid != 2 --- diff --git a/functions.php b/functions.php index a65a1a00..22f2b00f 100644 --- a/functions.php +++ b/functions.php @@ -1749,7 +1749,7 @@ $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) FROM ttrss_user_entries WHERE int_id = post_int_id AND unread = true)) AS count FROM ttrss_tags - WHERE owner_uid = 2 GROUP BY tag_name ORDER BY tag_name"); + WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name ORDER BY tag_name"); $tags = array(); @@ -3049,7 +3049,7 @@ $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) FROM ttrss_user_entries WHERE int_id = post_int_id AND unread = true)) AS count FROM ttrss_tags - WHERE owner_uid = 2 GROUP BY tag_name ORDER BY tag_name"); + WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name ORDER BY tag_name"); $tags = array();