From 1b7c0d261f17bb805744671ef53c5975b490a63e Mon Sep 17 00:00:00 2001 From: katagia Date: Fri, 13 Feb 2004 09:48:14 +0000 Subject: [PATCH] chnaged return array of getProfileOptions. Use Module names as array-index. Removed error-message when creating a new account. --- lam/lib/modules.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index c8b8bfd3..9496aee1 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -84,7 +84,7 @@ function getAvailableModules($scope) { return $return; } -function getProfileOptions($scope, $post) { +function getProfileOptions($scope, $post=false) { // type = user, group, host, ... if (!isset($_SESSION['profile_account'])) { // create new object @@ -623,7 +623,9 @@ class accountContainer { $function = 'display_html_' . $item; $page = $this->module[$singlemodule]->$function($post,true); //eval($function); - $return = array_merge($return, $page); + foreach ( $page as $item ) + $return[$singlemodule][] = $item; + //$return = array_merge($return, $page); } } return $return; @@ -654,6 +656,7 @@ class accountContainer { foreach ($modules as $module) $this->module[$module] = new $module($this->base); $module = array_keys ($this->module); + $modulelist = array(); // loop until all modules are in order. // We don't want to loop forever $remain = count($module) * count($module);