diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-10-21 23:38:55 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-10-21 23:38:55 +0200 |
commit | 6c39563e9f7fad18f1425292dca652861f5e1cb6 (patch) | |
tree | dbfd7add9a1efe4d42295170aa88782db74d3de4 /phpBB/includes/functions_display.php | |
parent | 2fafa5410770e62daf8ba0ffa46cc9ceeec61608 (diff) | |
download | forums-6c39563e9f7fad18f1425292dca652861f5e1cb6.tar forums-6c39563e9f7fad18f1425292dca652861f5e1cb6.tar.gz forums-6c39563e9f7fad18f1425292dca652861f5e1cb6.tar.bz2 forums-6c39563e9f7fad18f1425292dca652861f5e1cb6.tar.xz forums-6c39563e9f7fad18f1425292dca652861f5e1cb6.zip |
[feature/soft-delete] Add a function to calculate the actual post/topic count
PHPBB3-9567
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 10f07bfbf1..ed91d9ad1c 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -200,8 +200,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } // Count the difference of real to public topics, so we can display an information to moderators - $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && ($row['forum_topics_real'] != $row['forum_topics'])) ? $forum_id : 0; - $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics']; + $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0; + $row['forum_posts'] = phpbb_content_visibility::get_count('forum_posts', $row, $forum_id); + $row['forum_topics'] = phpbb_content_visibility::get_count('forum_topics', $row, $forum_id); // Display active topics from this forum? if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) |