]> git.wh0rd.org Git - tt-rss.git/commitdiff
possible fix for possible tag bug
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Nov 2005 10:04:25 +0000 (11:04 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Nov 2005 10:04:25 +0000 (11:04 +0100)
functions.php

index c35519109bea7849aae4b8303419ae8b08d1b4a1..9a6f70184d4b0e8f109a44a2d280f56b8ca3bd71 100644 (file)
                                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) {