]> git.wh0rd.org Git - tt-rss.git/commitdiff
get_article_tags: selection fix
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 9 Aug 2007 16:32:43 +0000 (17:32 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 9 Aug 2007 16:32:43 +0000 (17:32 +0100)
functions.php
modules/backend-rpc.php

index c1dd76446fac151b8574a36f6a3da9abf8b2e847..0583b3173635718233f1ced99452f625ba27ca69 100644 (file)
                $tmp_result = db_query($link, "SELECT DISTINCT tag_name, 
                        owner_uid as owner FROM
                        ttrss_tags WHERE post_int_id = (SELECT int_id FROM ttrss_user_entries WHERE
-                               ref_id = '$a_id' LIMIT 1) ORDER BY tag_name");
+                               ref_id = '$a_id' AND owner_uid = ".$_SESSION["uid"]." LIMIT 1) ORDER BY tag_name");
 
                $tags = array();        
        
                                print "<div clear='both'>" . $line["title"] . "$entry_author</div>";
                        }
 
-                       $tmp_result = db_query($link, "SELECT DISTINCT tag_name FROM
+/*                     $tmp_result = db_query($link, "SELECT DISTINCT tag_name FROM
                                ttrss_tags WHERE post_int_id = " . $line["int_id"] . "
-                               ORDER BY tag_name");
+                               ORDER BY tag_name"); */
+
+                       $tags = get_article_tags($link, $id);
        
                        $tags_str = "";
                        $f_tags_str = "";
 
                        $num_tags = 0;
 
-                       while ($tmp_line = db_fetch_assoc($tmp_result)) {
+                       foreach ($tags as $tag) {
                                $num_tags++;
-                               $tag = $tmp_line["tag_name"];
                                $tag_escaped = str_replace("'", "\\'", $tag);
 
                                $tag_str = "<a href=\"javascript:viewfeed('$tag_escaped')\">$tag</a>, ";
index 3d0adf57c23978a5839b3654e7e8c008334424df..b41709bcd5de25de26f7e65b152021191940a8bc 100644 (file)
                                                continue;
                                        }
 
-//                                     print "<!-- $tag -->";
+                                       print "<!-- $id : $int_id : $tag -->";
                                        
                                        if ($tag != '') {
                                                db_query($link, "INSERT INTO ttrss_tags