navigation MDL-22723 Fixed issue with navigation not automatically initialising during page modification

This commit is contained in:
Sam Hemelryk
2010-06-10 07:47:59 +00:00
parent 5d07e95756
commit e2b436d065
+11 -2
View File
@@ -893,6 +893,7 @@ class global_navigation extends navigation_node {
if ($this->initialised || during_initial_install()) {
return true;
}
$this->initialised = true;
// Set up the five base root nodes. These are nodes where we will put our
// content and are as follows:
@@ -1084,8 +1085,6 @@ class global_navigation extends navigation_node {
$this->children->add($child);
}
}
$this->initialised = true;
return true;
}
/**
@@ -1877,6 +1876,16 @@ class global_navigation extends navigation_node {
}
return true;
}
public function get($key, $type = null) {
$this->initialise();
parent::get($key, $type);
}
public function find($key, $type) {
$this->initialise();
parent::find($key, $type);
}
}
/**