From: Andrew Dolgov Date: Thu, 17 Nov 2005 18:04:00 +0000 (+0100) Subject: further functions.php uid work X-Git-Tag: schema_feature_freeze_for_1.1~253 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=06da450f4ce9e462d1b337e37e0bee5de07d77bc;p=tt-rss.git further functions.php uid work --- diff --git a/functions.php b/functions.php index da3ac872..42d00c06 100644 --- a/functions.php +++ b/functions.php @@ -1,11 +1,11 @@ "; @@ -257,7 +257,8 @@ feed_id, comments, no_orig_date, - date_entered) + date_entered, + owner_uid) VALUES ('$entry_title', '$entry_guid', @@ -268,7 +269,7 @@ '$feed', '$entry_comments', $no_orig_date, - NOW())"; + NOW(),".$_SESSION["uid"].")"; $result = db_query($link, $query); @@ -362,14 +363,14 @@ $tag = db_escape_string(strtolower($tag)); $result = db_query($link, "SELECT id FROM ttrss_tags - WHERE tag_name = '$tag' AND post_id = '$entry_id' LIMIT 1"); + WHERE tag_name = '$tag' AND post_id = '$entry_id' AND owner_uid = ".$_SESSION["uid"]." LIMIT 1"); if ($result && db_num_rows($result) == 0) { // print "tagging $entry_id as $tag
"; - db_query($link, "INSERT INTO ttrss_tags (tag_name,post_id) - VALUES ('$tag', '$entry_id')"); + db_query($link, "INSERT INTO ttrss_tags (owner_uid,tag_name,post_id) + VALUES ('".$_SESSION["uid"]."','$tag', '$entry_id')"); } } }