diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-01-05 18:33:23 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-01-05 18:33:23 -0500 |
commit | 9ba37f4643f825052c002bda16884ccc73f57ebc (patch) | |
tree | 08379f2959d3c403012340daec008295d797c514 /pages/post.php | |
parent | 36879e223fa97ab0f354bd86af3e53c11b06b7b6 (diff) | |
download | fourisland-9ba37f4643f825052c002bda16884ccc73f57ebc.tar.gz fourisland-9ba37f4643f825052c002bda16884ccc73f57ebc.tar.bz2 fourisland-9ba37f4643f825052c002bda16884ccc73f57ebc.zip |
Improved anonymous commenting
There was a bug where, if an anonymous commenter used a username that was being used by an actual member, Four Island would think the anonymous commentor was actually the member.
Diffstat (limited to 'pages/post.php')
-rwxr-xr-x | pages/post.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/post.php b/pages/post.php index 48239cf..7d6dd08 100755 --- a/pages/post.php +++ b/pages/post.php | |||
@@ -56,7 +56,7 @@ if (!isset($_GET['id'])) | |||
56 | { | 56 | { |
57 | if ($getanon3['email'] == $_POST['email']) | 57 | if ($getanon3['email'] == $_POST['email']) |
58 | { | 58 | { |
59 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . $_POST['username'] . "\", comment = \"" . $_POST['comment'] . "\""; | 59 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . $_POST['username'] . "\", comment = \"" . $_POST['comment'] . "\", is_anon = 1"; |
60 | $setcomment2 = mysql_query($setcomment); | 60 | $setcomment2 = mysql_query($setcomment); |
61 | 61 | ||
62 | $page_id = $_GET['id']; | 62 | $page_id = $_GET['id']; |
@@ -84,7 +84,7 @@ if (!isset($_GET['id'])) | |||
84 | } | 84 | } |
85 | } | 85 | } |
86 | } else { | 86 | } else { |
87 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . getSessionUsername() . "\", comment = \"" . $_POST['comment'] . "\""; | 87 | $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . getSessionUsername() . "\", comment = \"" . $_POST['comment'] . "\", is_anon = 0"; |
88 | $setcomment2 = mysql_query($setcomment); | 88 | $setcomment2 = mysql_query($setcomment); |
89 | 89 | ||
90 | mail('hatkirby@fourisland.com', 'New comment on Four Island!', getSessionUsername() . ' has posted a comment on Four Island under the "page id" ' . $_GET['id']); | 90 | mail('hatkirby@fourisland.com', 'New comment on Four Island!', getSessionUsername() . ' has posted a comment on Four Island under the "page id" ' . $_GET['id']); |