mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
1 changed files with 5 additions and 7 deletions
|
@ -3072,7 +3072,6 @@ EOD;
|
||||||
case 'divider':
|
case 'divider':
|
||||||
// If the nav item is a divider, add one and skip link processing.
|
// If the nav item is a divider, add one and skip link processing.
|
||||||
$am->add($divider);
|
$am->add($divider);
|
||||||
$idx++;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'invalid':
|
case 'invalid':
|
||||||
|
@ -3098,16 +3097,15 @@ EOD;
|
||||||
array('class' => 'icon')
|
array('class' => 'icon')
|
||||||
);
|
);
|
||||||
$am->add($al);
|
$am->add($al);
|
||||||
|
|
||||||
// Add dividers after the first item and before the
|
|
||||||
// last item.
|
|
||||||
if ($idx == 0 || $idx == $navitemcount - 2) {
|
|
||||||
$am->add($divider);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$idx++;
|
$idx++;
|
||||||
|
|
||||||
|
// Add dividers after the first item and before the last item.
|
||||||
|
if ($idx == 1 || $idx == $navitemcount - 1) {
|
||||||
|
$am->add($divider);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue