Skip to content

Commit

Permalink
! Avoid double separators in menu if a feature surrounded by separato…
Browse files Browse the repository at this point in the history
…rs was disabled. (Subs.php)
  • Loading branch information
Nao committed Mar 3, 2017
1 parent 7ea895d commit 0902d9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/app/Subs.php
Expand Up @@ -2309,14 +2309,17 @@ function setupMenuContext()
if (!empty($item['show']))
{
$item['active_item'] = false;
$was_sep = true;

// Go through the sub items if there are any.
if (!empty($item['items']))
{
foreach ($item['items'] as $key => $subitem)
{
if (empty($subitem['show']) && !empty($subitem))
if ((empty($subitem['show']) && !empty($subitem)) || ($was_sep && $subitem === ''))
unset($item['items'][$key]);
else
$was_sep = $subitem === '';

// 2nd level sub items next...
if (!empty($subitem['items']))
Expand Down

0 comments on commit 0902d9b

Please sign in to comment.