Merge branch 'w19_MDL-32807_m23_navref' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk
2012-05-09 11:01:31 +12:00
+5 -5
View File
@@ -756,9 +756,9 @@ class navigation_node_collection implements IteratorAggregate {
}
}
// Add a reference to the node to the progressive collection.
$this->collection[$newindex] = &$this->orderedcollection[$type][$key];
$this->collection[$newindex] = $this->orderedcollection[$type][$key];
// Update the last property to a reference to this new node.
$this->last = &$this->orderedcollection[$type][$key];
$this->last = $this->orderedcollection[$type][$key];
// Reorder the array by index if needed
if (!$last) {
@@ -1830,7 +1830,7 @@ class global_navigation extends navigation_node {
$categorynode->display = false;
}
}
$this->addedcategories[$category->id] = &$categorynode;
$this->addedcategories[$category->id] = $categorynode;
}
/**
@@ -2522,7 +2522,7 @@ class global_navigation extends navigation_node {
$coursenode->hidden = (!$course->visible);
$coursenode->title(format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id))));
if (!$forcegeneric) {
$this->addedcourses[$course->id] = &$coursenode;
$this->addedcourses[$course->id] = $coursenode;
}
return $coursenode;
@@ -4544,7 +4544,7 @@ class navigation_cache {
if (!isset($SESSION->navcache->{$this->area})) {
$SESSION->navcache->{$this->area} = array();
}
$this->session = &$SESSION->navcache->{$this->area};
$this->session = &$SESSION->navcache->{$this->area}; // pointer to array, =& is correct here
}
}