mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 12:30:42 +02:00
[ticket/11717] Use topic_posts_approved instead of topic_replies
Due to the move to soft-delete, the topic_replies column no longer exists in the topics table. Instead, the column topic_posts_approved should be used. PHPBB3-11717
This commit is contained in:
@@ -1995,6 +1995,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
}
|
||||
}
|
||||
|
||||
$first_post_topic_info = ($post_mode == 'edit_first_post' && (($post_visibility == ITEM_DELETED && $data['topic_posts_softdeleted'] == 1) ||
|
||||
($post_visibility == ITEM_UNAPPROVED && $data['topic_posts_unapproved'] == 1) ||
|
||||
($post_visibility == ITEM_APPROVED && $data['topic_posts_approved'] == 1)));
|
||||
// Fix the post's and topic's visibility and first/last post information, when the post is edited
|
||||
if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility)
|
||||
{
|
||||
@@ -2007,7 +2010,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
|
||||
}
|
||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
|
||||
else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $first_post_topic_info)
|
||||
{
|
||||
if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility)
|
||||
{
|
||||
|
Reference in New Issue
Block a user