MDL-27405 navigation: Fixed up buggy array_merge call
authorSam Hemelryk <sam@moodle.com>
Tue, 13 Mar 2012 21:16:34 +0000 (10:16 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 13 Mar 2012 21:16:34 +0000 (10:16 +1300)
lib/navigationlib.php

index 33835df..f807b7d 100644 (file)
@@ -1089,7 +1089,7 @@ class global_navigation extends navigation_node {
                     // Fetch any other categories we need.
                     $allcategories = $DB->get_records_list('course_categories', 'id', $categoryids, 'depth ASC, sortorder ASC');
                     if (is_array($allcategories) && count($allcategories) > 0) {
-                        $categories = array_merge($categories);
+                        $categories = array_merge($categories, $allcategories);
                     }
                 }