mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-27 12:00:26 +02:00
Fix topic count display for subfora
git-svn-id: file:///svn/phpbb/trunk@5057 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -63,7 +63,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
|
|
||||||
$branch_root_id = $root_data['forum_id'];
|
$branch_root_id = $root_data['forum_id'];
|
||||||
$forum_ids = array($root_data['forum_id']);
|
$forum_ids = array($root_data['forum_id']);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($mark_read == 'forums' && $user->data['user_id'] != ANONYMOUS)
|
if ($mark_read == 'forums' && $user->data['user_id'] != ANONYMOUS)
|
||||||
@@ -127,7 +126,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
$subforums[$parent_id]['display'] = ($row['display_on_index']) ? true : false;;
|
$subforums[$parent_id]['display'] = ($row['display_on_index']) ? true : false;;
|
||||||
$subforums[$parent_id]['name'][$forum_id] = $row['forum_name'];
|
$subforums[$parent_id]['name'][$forum_id] = $row['forum_name'];
|
||||||
|
|
||||||
// Include subforum topic/post counts in parent counts
|
|
||||||
$forum_rows[$parent_id]['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
$forum_rows[$parent_id]['forum_topics'] += ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
|
||||||
|
|
||||||
// Do not list redirects in LINK Forums as Posts.
|
// Do not list redirects in LINK Forums as Posts.
|
||||||
@@ -215,7 +213,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
$visible_forums++;
|
$visible_forums++;
|
||||||
$forum_id = $row['forum_id'];
|
$forum_id = $row['forum_id'];
|
||||||
|
|
||||||
|
|
||||||
// Generate list of subforums if we need to
|
// Generate list of subforums if we need to
|
||||||
if (isset($subforums[$forum_id]))
|
if (isset($subforums[$forum_id]))
|
||||||
{
|
{
|
||||||
@@ -262,7 +259,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
$l_subforums = '';
|
$l_subforums = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Which folder should we display?
|
// Which folder should we display?
|
||||||
if ($row['forum_status'] == ITEM_LOCKED)
|
if ($row['forum_status'] == ITEM_LOCKED)
|
||||||
{
|
{
|
||||||
@@ -274,7 +270,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
$folder_alt = (!empty($forum_unread[$forum_id])) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
|
$folder_alt = (!empty($forum_unread[$forum_id])) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create last post link information, if appropriate
|
// Create last post link information, if appropriate
|
||||||
if ($row['forum_last_post_id'])
|
if ($row['forum_last_post_id'])
|
||||||
{
|
{
|
||||||
@@ -290,7 +285,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
$last_post_time = $last_poster = $last_poster_url = $last_post_url = '';
|
$last_post_time = $last_poster = $last_poster_url = $last_post_url = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Output moderator listing ... if applicable
|
// Output moderator listing ... if applicable
|
||||||
$l_moderator = $moderators_list = '';
|
$l_moderator = $moderators_list = '';
|
||||||
if ($display_moderators && !empty($forum_moderators[$forum_id]))
|
if ($display_moderators && !empty($forum_moderators[$forum_id]))
|
||||||
@@ -313,7 +307,7 @@ function display_forums($root_data = '', $display_moderators = TRUE)
|
|||||||
'FORUM_NAME' => $row['forum_name'],
|
'FORUM_NAME' => $row['forum_name'],
|
||||||
'FORUM_DESC' => $row['forum_desc'],
|
'FORUM_DESC' => $row['forum_desc'],
|
||||||
$l_post_click_count => $post_click_count,
|
$l_post_click_count => $post_click_count,
|
||||||
'TOPICS' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['forum_topics_real'] : $row['forum_topics'],
|
'TOPICS' => $row['forum_topics'],
|
||||||
'LAST_POST_TIME' => $last_post_time,
|
'LAST_POST_TIME' => $last_post_time,
|
||||||
'LAST_POSTER' => $last_poster,
|
'LAST_POSTER' => $last_poster,
|
||||||
'MODERATORS' => $moderators_list,
|
'MODERATORS' => $moderators_list,
|
||||||
|
Reference in New Issue
Block a user