]> git.mjollnir.org Git - moodle.git/commitdiff
course categories: MDL-17502 followup. Fix notices. I'm sure I remember writing this...
authortjhunt <tjhunt>
Tue, 9 Dec 2008 09:27:25 +0000 (09:27 +0000)
committertjhunt <tjhunt>
Tue, 9 Dec 2008 09:27:25 +0000 (09:27 +0000)
course/lib.php

index 452cc77e7cd697dea98b43a2db0fc85c24d05d57..f07a3b98a3fbf037196089cca3a5ee2fb0a8f108 100644 (file)
@@ -1767,6 +1767,10 @@ function make_categories_list(&$list, &$parents, $requiredcapability = '',
         $parents = array();
     }
 
+    if (is_string($requiredcapability) && $requiredcapability) {
+        $requiredcapability = array($requiredcapability);
+    }
+
     if (empty($category)) {
         // Start at the top level.
         $category = new stdClass;