]> git.wh0rd.org - tt-rss.git/commitdiff
fix tag browser/rpc counters to work for users with uid != 2
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 21 Dec 2006 17:29:08 +0000 (18:29 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 21 Dec 2006 17:29:08 +0000 (18:29 +0100)
functions.php

index a65a1a0091b32da9e53a8527fe001c03c99011d2..22f2b00fa8d444817b12965349de4044fa396fcf 100644 (file)
                $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();
 
                        $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();