mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- more bugfixes
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5211 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -296,6 +296,19 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
|
||||
);
|
||||
|
||||
//
|
||||
// Let's decide which categories we should display
|
||||
//
|
||||
$display_categories = array();
|
||||
|
||||
for ($i = 0; $i < $total_forums; $i++ )
|
||||
{
|
||||
if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'])
|
||||
{
|
||||
$display_categories[$forum_data[$i]['cat_id']] = true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Okay, let's build the index
|
||||
//
|
||||
@@ -303,23 +316,11 @@ if( ( $total_categories = count($category_rows) ) )
|
||||
{
|
||||
$cat_id = $category_rows[$i]['cat_id'];
|
||||
|
||||
//
|
||||
// Should we display this category/forum set?
|
||||
//
|
||||
$display_forums = false;
|
||||
for($j = 0; $j < $total_forums; $j++)
|
||||
{
|
||||
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
|
||||
{
|
||||
$display_forums = true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Yes, we should, so first dump out the category
|
||||
// title, then, if appropriate the forum list
|
||||
//
|
||||
if ( $display_forums )
|
||||
if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
|
||||
{
|
||||
$template->assign_block_vars('catrow', array(
|
||||
'CAT_ID' => $cat_id,
|
||||
|
Reference in New Issue
Block a user