Skip to content

Commit

Permalink
MDL-50484 block_navigation: Set number to be unique
Browse files Browse the repository at this point in the history
Set number to be unique for unique id's
in navigation
  • Loading branch information
Rajesh Taneja committed Feb 19, 2016
1 parent 1ebda3e commit 7e341eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocks/navigation/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected function navigation_node($items, $attrs=array(), $expansionlimit=null,

// Turn our navigation items into list items.
$lis = array();
$number = 0;
// Set the number to be static for unique id's.
static $number = 0;
foreach ($items as $item) {
$number++;
if (!$item->display && !$item->contains_active_node()) {
Expand Down

0 comments on commit 7e341eb

Please sign in to comment.