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 /includes/comments.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 'includes/comments.php')
-rwxr-xr-x | includes/comments.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/comments.php b/includes/comments.php index d405279..f1b8228 100755 --- a/includes/comments.php +++ b/includes/comments.php | |||
@@ -43,16 +43,17 @@ $getcomments2 = mysql_query($getcomments) or die($getcomments); | |||
43 | $i=0; | 43 | $i=0; |
44 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | 44 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) |
45 | { | 45 | { |
46 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 46 | if ($getcomments3[$i]['is_anon'] == 0) |
47 | $getuser2 = mysql_query($getuser); | ||
48 | $getuser3 = mysql_fetch_array($getuser2); | ||
49 | |||
50 | if ($getuser3['username'] == $getcomments3[$i]['username']) | ||
51 | { | 47 | { |
48 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | ||
49 | $getuser2 = mysql_query($getuser); | ||
50 | $getuser3 = mysql_fetch_array($getuser2); | ||
51 | |||
52 | $username = $getuser3['username']; | 52 | $username = $getuser3['username']; |
53 | $email = $getuser3['user_email']; | 53 | $email = $getuser3['user_email']; |
54 | $website = $getuser3['user_website']; | 54 | $website = $getuser3['user_website']; |
55 | } else { | 55 | } else if ($getcomments3[$i]['is_anon'] == 1) |
56 | { | ||
56 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 57 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
57 | $getanon2 = mysql_query($getanon); | 58 | $getanon2 = mysql_query($getanon); |
58 | $getanon3 = mysql_fetch_array($getanon2); | 59 | $getanon3 = mysql_fetch_array($getanon2); |