mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-48542 user_menu: Increment index for all menu items
The invalid type was not causing the idx to incremented, thus missing off the final divider.
This commit is contained in:
parent
8b7ca27d48
commit
ade0072379
@ -3072,7 +3072,6 @@ EOD;
|
||||
case 'divider':
|
||||
// If the nav item is a divider, add one and skip link processing.
|
||||
$am->add($divider);
|
||||
$idx++;
|
||||
break;
|
||||
|
||||
case 'invalid':
|
||||
@ -3098,16 +3097,15 @@ EOD;
|
||||
array('class' => 'icon')
|
||||
);
|
||||
$am->add($al);
|
||||
|
||||
// Add dividers after the first item and before the
|
||||
// last item.
|
||||
if ($idx == 0 || $idx == $navitemcount - 2) {
|
||||
$am->add($divider);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$idx++;
|
||||
|
||||
// Add dividers after the first item and before the last item.
|
||||
if ($idx == 1 || $idx == $navitemcount - 1) {
|
||||
$am->add($divider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user