From 762f33535e78c3eef2ab4b629d45d889c66c1c33 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 11 Mar 2008 12:05:22 +0000 Subject: Menu items fix git-svn-id: https://code.elgg.org/elgg/trunk@157 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/lib') 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; } -- cgit v1.2.3