Fixed guest username editing issue

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3186 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-12-10 18:31:24 +00:00
parent afe3c78113
commit aab01d335a
2 changed files with 2 additions and 1 deletions

View file

@ -140,6 +140,7 @@ h3 {font-size:12pt;color:blue}
<li>Fixed possible cross-site scripting issue with username search</li>
<li>Fixed some problems with gzip in combination with newer PHP versions and Mozilla</li>
<li>Fixed wrong maxlength in modcp_split.tpl subject field</li>
<li>Fixed inability to edit username of guest poster - <b>vHiker</b></li>
<li></li>
</ul>

View file

@ -281,7 +281,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
}
$edited_sql = ( $mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post'] ) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = $post_username, enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);