diff options
author | Andrew Dolgov <[email protected]> | 2007-08-09 17:34:53 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-08-09 17:34:53 +0100 |
commit | bc976a8cde7a18a2997e36ecfc6e0b046923e446 (patch) | |
tree | 116f2141d1e152dfc25a965bb7ca6de6104fae5a /functions.php | |
parent | 9cfd409d256d1217784aa1c49a8349485da16b6a (diff) |
get_article_tags: specify owner for syndicated feeds
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/functions.php b/functions.php index 0583b3173..5515781a8 100644 --- a/functions.php +++ b/functions.php @@ -2734,7 +2734,7 @@ print "<guid>" . htmlspecialchars($line["guid"]) . "</guid>"; print "<link>" . htmlspecialchars($line["link"]) . "</link>"; - $tags = get_article_tags($link, $line["id"]); + $tags = get_article_tags($link, $line["id"], $owner_uid); foreach ($tags as $tag) { print "<category>" . htmlspecialchars($tag) . "</category>"; @@ -3510,14 +3510,16 @@ } - function get_article_tags($link, $id) { + function get_article_tags($link, $id, $owner_uid = 0) { $a_id = db_escape_string($id); + if (!$owner_uid) $owner_uid = $_SESSION["uid"]; + $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' AND owner_uid = ".$_SESSION["uid"]." LIMIT 1) ORDER BY tag_name"); + ref_id = '$a_id' AND owner_uid = '$owner_uid' LIMIT 1) ORDER BY tag_name"); $tags = array(); |