diff options
author | Andrew Dolgov <[email protected]> | 2005-11-18 11:04:25 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-18 11:04:25 +0100 |
commit | ab15e65ddc28ee3a91405d960d31a82a676c4e22 (patch) | |
tree | cd22045495f67ac3cfb9260805afd89bb406fc9e /functions.php | |
parent | 870ef47907836d9c7d61e996c01641155a16a272 (diff) |
possible fix for possible tag bug
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/functions.php b/functions.php index c35519109..9a6f70184 100644 --- a/functions.php +++ b/functions.php @@ -352,19 +352,22 @@ if (count($entry_tags) > 0) { $result = db_query($link, "SELECT id FROM ttrss_entries - WHERE guid = '$entry_guid'"); + WHERE guid = '$entry_guid' AND owner_uid = " . $_SESSION["uid"]); if (!$result || db_num_rows($result) != 1) { return; } $entry_id = db_fetch_result($result, 0, "id"); - + foreach ($entry_tags as $tag) { $tag = db_escape_string(strtolower($tag)); $result = db_query($link, "SELECT id FROM ttrss_tags - WHERE tag_name = '$tag' AND post_id = '$entry_id' AND owner_uid = ".$_SESSION["uid"]." LIMIT 1"); + WHERE tag_name = '$tag' AND post_id = '$entry_id' AND + owner_uid = ".$_SESSION["uid"]." LIMIT 1"); + +// print db_fetch_result($result, 0, "id"); if ($result && db_num_rows($result) == 0) { |