From f422531c0ac283465d54cdf720dd587cf4e22608 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 21 Mar 2002 01:03:47 +0000 Subject: [PATCH] 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 --- phpBB/posting.php | 13 +++++++------ 1 file 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();