mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/soft-delete] Fix a bug in sync() and set_post_visibility()
PHPBB3-9657
This commit is contained in:
@@ -1908,12 +1908,12 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
unset($delete_topics[$topic_id]);
|
||||
|
||||
$topic_data[$topic_id]['replies_real'] += $row['total_posts'];
|
||||
$topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']);
|
||||
|
||||
if ($row['post_visibility'] || !$topic_data[$topic_id]['last_post_id'])
|
||||
if ($row['post_visibility'] == ITEM_APPROVED)
|
||||
{
|
||||
$topic_data[$topic_id]['replies'] = $row['total_posts'] - 1;
|
||||
$topic_data[$topic_id]['first_post_id'] = $row['first_post_id'];
|
||||
$topic_data[$topic_id]['last_post_id'] = $row['last_post_id'];
|
||||
$topic_data[$topic_id]['replies'] = $row['total_posts'] - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user