diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-21 01:03:47 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-21 01:03:47 +0000 |
commit | f422531c0ac283465d54cdf720dd587cf4e22608 (patch) | |
tree | f16e7c11e9a36251dbbbd4d6e4bfec4a566da443 /phpBB | |
parent | 23b82723dbd6aca4ac0670e941467f7241221e92 (diff) | |
download | forums-f422531c0ac283465d54cdf720dd587cf4e22608.tar forums-f422531c0ac283465d54cdf720dd587cf4e22608.tar.gz forums-f422531c0ac283465d54cdf720dd587cf4e22608.tar.bz2 forums-f422531c0ac283465d54cdf720dd587cf4e22608.tar.xz forums-f422531c0ac283465d54cdf720dd587cf4e22608.zip |
Fix failure if duplicate username, no subject, no post, etc. errors have occured when submitting, bug #532336
git-svn-id: file:///svn/phpbb/trunk@2383 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/posting.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 7588281c05..6584e241f5 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -530,6 +530,7 @@ else if ( $submit || $confirm ) $topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type; submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length); + if ( $error_msg == '' ) user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user); } break; @@ -540,14 +541,14 @@ else if ( $submit || $confirm ) break; } - if ( $mode != 'editpost' ) - { - $user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; - update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); - } - if ( $error_msg == '' ) { + if ( $mode != 'editpost' ) + { + $user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; + update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); + } + if ( $mode == 'newtopic' || $mode == 'reply' ) { $tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); |