From 6244422da939bc2b06739b5ef6ac129bf88df42e Mon Sep 17 00:00:00 2001 From: David M Date: Fri, 11 May 2007 23:29:59 +0000 Subject: [PATCH] #10781 Thanks APTX git-svn-id: file:///svn/phpbb/trunk@7537 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 2 +- phpBB/posting.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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);