diff options
-rw-r--r-- | engine/lib/elgglib.php | 16 | ||||
-rw-r--r-- | views/default/navigation/toolbox.php | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 06a687363..e38288ac1 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -211,7 +211,7 @@ global $CONFIG;
- if (empty($register_name) || empty($subregister_name) || empty($register_array))
+ if (empty($register_name) || empty($subregister_name) || empty($children_array))
return false;
if (!isset($CONFIG->registers))
@@ -220,16 +220,16 @@ if (!isset($CONFIG->registers[$register_name]))
$CONFIG->registers[$register_name] = array();
- if (is_array($register_array)) {
- $subregister = new stdClass;
- $subregister->name = $subregister_name;
- $subregister->value = $subregister_value;
+ $subregister = new stdClass;
+ $subregister->name = $subregister_name;
+ $subregister->value = $subregister_value;
+
+ if (is_array($children_array)) {
$subregister->children = $children_array;
- $CONFIG->registers[$register_name][$subregister_name] = $subregister;
- return true;
}
- return false;
+ $CONFIG->registers[$register_name][$subregister_name] = $subregister;
+ return true;
}
diff --git a/views/default/navigation/toolbox.php b/views/default/navigation/toolbox.php index bf96105ad..cefd16aab 100644 --- a/views/default/navigation/toolbox.php +++ b/views/default/navigation/toolbox.php @@ -33,7 +33,7 @@ <?php
if (sizeof($item->children) > 0 ) {
-
+ echo "<ul>";
foreach($item->children as $subitem) {
?>
<li>
@@ -41,6 +41,7 @@ </li>
<?php
}
+ echo "</ul>";
}
|