mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch '3.1.x'
This commit is contained in:
commit
e60b7f6cf2
1 changed files with 13 additions and 1 deletions
|
@ -150,7 +150,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$forum_tracking_info = array();
|
$forum_tracking_info = $valid_categories = array();
|
||||||
$branch_root_id = $root_data['forum_id'];
|
$branch_root_id = $root_data['forum_id'];
|
||||||
|
|
||||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||||
|
@ -251,6 +251,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fill list of categories with forums
|
||||||
|
if (isset($forum_rows[$row['parent_id']]))
|
||||||
|
{
|
||||||
|
$valid_categories[$row['parent_id']] = true;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if ($row['parent_id'] == $root_data['forum_id'] || $row['parent_id'] == $branch_root_id)
|
if ($row['parent_id'] == $root_data['forum_id'] || $row['parent_id'] == $branch_root_id)
|
||||||
{
|
{
|
||||||
|
@ -405,6 +411,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
// Category
|
// Category
|
||||||
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
|
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
|
||||||
{
|
{
|
||||||
|
// Do not display categories without any forums to display
|
||||||
|
if (!isset($valid_categories[$row['forum_id']]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$cat_row = array(
|
$cat_row = array(
|
||||||
'S_IS_CAT' => true,
|
'S_IS_CAT' => true,
|
||||||
'FORUM_ID' => $row['forum_id'],
|
'FORUM_ID' => $row['forum_id'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue