diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-11 12:05:22 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-11 12:05:22 +0000 |
commit | 762f33535e78c3eef2ab4b629d45d889c66c1c33 (patch) | |
tree | 4500ce51a428bb5c6c6add0730bcc1bbd2e333a3 | |
parent | fb24a0743e9f011b2e03c8a13f46cae901241cab (diff) | |
download | elgg-762f33535e78c3eef2ab4b629d45d889c66c1c33.tar.gz elgg-762f33535e78c3eef2ab4b629d45d889c66c1c33.tar.bz2 |
Menu items fix
git-svn-id: https://code.elgg.org/elgg/trunk@157 36083f99-b078-4883-b0ff-0f9b5a30f544
-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>";
}
|