diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 912e73a8a7..3b0da3d63b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1432,7 +1432,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } else if ($mode == 'edit') { - $post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); + $post_mode = ($data['topic_replies_real'] == 0) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); } // First of all make sure the subject and topic title are having the correct length. diff --git a/phpBB/posting.php b/phpBB/posting.php index 14d7c7e668..c14cde21d4 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -951,6 +951,12 @@ if ($submit || $preview || $refresh) 'topic_approved' => (isset($post_data['topic_approved'])) ? $post_data['topic_approved'] : false, 'post_approved' => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false, ); + + if ($mode == 'edit') + { + $data['topic_replies_real'] = $post_data['topic_replies_real']; + } + unset($message_parser); $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message);