1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[feature/soft-delete] Correctly calculate the number of replies everywhere

PHPBB3-9567
This commit is contained in:
Joas Schilling
2012-10-22 11:14:00 +02:00
parent 6c39563e9f
commit 9945561b4b
6 changed files with 9 additions and 17 deletions

View File

@@ -275,7 +275,7 @@ if ($post_id)
if ($sort_dir == $check_sort)
{
$topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
$topic_data['prev_posts'] = phpbb_content_visibility::get_count('topic_posts', $topic_data, $forum_id) - 1;
}
else
{
@@ -309,8 +309,7 @@ if ($post_id)
}
$topic_id = (int) $topic_data['topic_id'];
//
$topic_replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
$topic_replies = phpbb_content_visibility::get_count('topic_posts', $topic_data, $forum_id) - 1;
// Check sticky/announcement time limit
if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time())