]> git.mjollnir.org Git - moodle.git/commitdiff
navigation MDL-14632 Fixed navbar bug whereby if no active pages were found in either...
authorsamhemelryk <samhemelryk>
Wed, 2 Sep 2009 07:08:33 +0000 (07:08 +0000)
committersamhemelryk <samhemelryk>
Wed, 2 Sep 2009 07:08:33 +0000 (07:08 +0000)
`home` was not added to the navbar

lib/navigationlib.php

index b6d2a1b1070bffe067a0a4da2e59c462eaea0963..dd00b3109389a32ba114f743d4d474e7bd6b7926 100644 (file)
@@ -1860,8 +1860,9 @@ class navbar extends navigation_node {
         } else if ($this->page->settingsnav->contains_active_node()) {
             // Parse the settings navigation to get the active node
             $output .= $this->parse_branch_to_html($this->page->settingsnav->children, true, $customchildren);
+        } else {
+            $output .= $this->parse_branch_to_html($this, true, $customchildren);
         }
-
         // Check if there are any children added by code
         if ($customchildren) {
             // Add the custom children
@@ -1887,6 +1888,7 @@ class navbar extends navigation_node {
             $output .= '<li class="first">'.parent::content(true).'</li>';
         }
         $count = 0;
+        if (!is_array($navarray)) return $output;
         // Iterate the navarray and display each node
         while (count($navarray)>0) {
             // Sanity check make sure we don't display WAY too much information