From: Andrew Dolgov Date: Thu, 9 Aug 2007 16:32:43 +0000 (+0100) Subject: get_article_tags: selection fix X-Git-Tag: 1.2.14~106 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9cfd409d256d1217784aa1c49a8349485da16b6a;p=tt-rss.git get_article_tags: selection fix --- diff --git a/functions.php b/functions.php index c1dd7644..0583b317 100644 --- a/functions.php +++ b/functions.php @@ -3517,7 +3517,7 @@ $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(); @@ -3701,18 +3701,19 @@ print "
" . $line["title"] . "$entry_author
"; } - $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 = "$tag, "; diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 3d0adf57..b41709bc 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -284,7 +284,7 @@ continue; } -// print ""; + print ""; if ($tag != '') { db_query($link, "INSERT INTO ttrss_tags