From 0822d2bb61dda3b887911d6686a8c6db05131c47 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Oct 2012 15:32:57 +0200 Subject: [feature/soft-delete] Split unapproved/soft deleted posts from topics If a topic is soft deleted through a moderator, the topic_delete_user is set. If it is passively soft deleted (f.e. while the only approved post is deleted) the topic_delete_user is not set. This way, we can distinguish between these two cases. The same also applies to unapproved posts. So we need to set the topic_delete_user when an unapproved topic is posted. Topics that were soft deleted/unapproved by a user (rather then passive) are going to be displayed in the Topics modules, while all others are in the posts modules of the MCP queue. PHPBB3-9567 --- phpBB/includes/functions_posting.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index b6223b72d4..1a0fdcee85 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1864,6 +1864,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'forum_id' => $data['forum_id'], 'icon_id' => $data['icon_id'], 'topic_visibility' => $post_visibility, + 'topic_delete_user' => ($post_visibility != ITEM_APPROVED) ? (int) $user->data['user_id'] : 0, 'topic_title' => $subject, 'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''), 'topic_first_poster_colour' => $user->data['user_colour'], -- cgit v1.2.1