diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2008-02-01 13:12:05 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2008-02-01 13:12:05 +0000 |
commit | ae0fb4b070fc689a3639a0864ba1c4f3889d6c91 (patch) | |
tree | 068c0d890dd951b852cbe7b4c060fde6f2f439c4 /phpBB/includes/functions_posting.php | |
parent | cc1ac794502e116f3367c12cc0e4fa272d0a29ec (diff) | |
download | forums-ae0fb4b070fc689a3639a0864ba1c4f3889d6c91.tar forums-ae0fb4b070fc689a3639a0864ba1c4f3889d6c91.tar.gz forums-ae0fb4b070fc689a3639a0864ba1c4f3889d6c91.tar.bz2 forums-ae0fb4b070fc689a3639a0864ba1c4f3889d6c91.tar.xz forums-ae0fb4b070fc689a3639a0864ba1c4f3889d6c91.zip |
#15120
#16029
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8362 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 33fab63235..615c65e1ad 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1332,9 +1332,21 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) global $config, $phpEx, $phpbb_root_path; // Specify our post mode - $post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'delete_topic' : (($data['topic_first_post_id'] == $post_id) ? 'delete_first_post' : (($data['topic_last_post_id'] == $post_id) ? 'delete_last_post' : 'delete')); + $post_mode = 'delete'; + if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && $data['topic_replies_real'] == 0) + { + $post_mode = 'delete_topic'; + } + else if ($data['topic_first_post_id'] == $post_id) + { + $post_mode = 'delete_first_post'; + } + else if ($data['topic_last_post_id'] == $post_id) + { + $post_mode = 'delete_last_post'; + } $sql_data = array(); - $next_post_id = 0; + $next_post_id = false; include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); |