aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 12:05:22 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 12:05:22 +0000
commit762f33535e78c3eef2ab4b629d45d889c66c1c33 (patch)
tree4500ce51a428bb5c6c6add0730bcc1bbd2e333a3 /engine/lib
parentfb24a0743e9f011b2e03c8a13f46cae901241cab (diff)
downloadelgg-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
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php16
1 files changed, 8 insertions, 8 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;
}