mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
ok, try this one. :) Hopefully not breaking anything.
git-svn-id: file:///svn/phpbb/trunk@6013 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
69f132fec8
commit
2ab88e7c56
1 changed files with 42 additions and 1 deletions
|
@ -463,7 +463,7 @@ class p_master
|
||||||
{
|
{
|
||||||
global $template;
|
global $template;
|
||||||
|
|
||||||
$current_id = false;
|
$current_id = $right_id = false;
|
||||||
|
|
||||||
// Make sure the module_url has a question mark set, effectively determining the delimiter to use
|
// Make sure the module_url has a question mark set, effectively determining the delimiter to use
|
||||||
$delim = (strpos($module_url, '?') === false) ? '?' : '&';
|
$delim = (strpos($module_url, '?') === false) ? '?' : '&';
|
||||||
|
@ -478,11 +478,52 @@ class p_master
|
||||||
// and a linear list for subcategories/items
|
// and a linear list for subcategories/items
|
||||||
foreach ($this->module_ary as $row_id => $itep_ary)
|
foreach ($this->module_ary as $row_id => $itep_ary)
|
||||||
{
|
{
|
||||||
|
// Skip hidden modules
|
||||||
if (!$itep_ary['display'])
|
if (!$itep_ary['display'])
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip branch
|
||||||
|
if ($right_id !== false)
|
||||||
|
{
|
||||||
|
if ($itep_ary['left'] < $right_id)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$right_id = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Category with no members on their way down (we have to check every level)
|
||||||
|
if (!$itep_ary['name'])
|
||||||
|
{
|
||||||
|
$empty_category = true;
|
||||||
|
|
||||||
|
// We go through the branch and look for an activated module
|
||||||
|
foreach (array_slice($this->module_ary, $row_id + 1) as $temp_row)
|
||||||
|
{
|
||||||
|
if ($temp_row['left'] > $itep_ary['left'] && $temp_row['left'] < $itep_ary['right'])
|
||||||
|
{
|
||||||
|
// Module there and displayed?
|
||||||
|
if ($temp_row['name'] && $temp_row['display'])
|
||||||
|
{
|
||||||
|
$empty_category = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip the branch
|
||||||
|
if ($empty_category)
|
||||||
|
{
|
||||||
|
$right_id = $itep_ary['right'];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Select first id we can get
|
// Select first id we can get
|
||||||
if (!$current_id && (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id))
|
if (!$current_id && (in_array($itep_ary['id'], array_keys($this->module_cache['parents'])) || $itep_ary['id'] == $this->p_id))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue