aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-02-01 13:15:50 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-02-01 13:15:50 +0000
commit9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715 (patch)
tree2ac0a160d6102c2379aaa5c1bfeb79ad92f2ce12 /phpBB/includes/functions_posting.php
parent48ed77f046f9f6bcdfb449f49698e9dac60787c8 (diff)
downloadforums-9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715.tar
forums-9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715.tar.gz
forums-9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715.tar.bz2
forums-9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715.tar.xz
forums-9a4a3a089aa4e4384d5462c4bc39dbdd5ec82715.zip
cross-ci 8362; #15120, #16029
git-svn-id: file:///svn/phpbb/trunk@8363 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 2ff7c364f3..7eba43c955 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);