From 4f46c325a0c4c5877c8b7d03ce04e89857e9f8c9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 22 Mar 2011 17:40:40 +0000 Subject: [PATCH] added Pavel's patch --- lam/lib/config.inc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 8aa43fa9..4a2ffdcd 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2010 Roland Gruber + Copyright (C) 2003 - 2011 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -335,14 +335,16 @@ class LAMConfig { for ($s = 0; $s < sizeof($scopes); $s++) { $scope = $scopes[$s]; $moduleVar = "modules_" . $scope; - $modules = explode(",", $this->typeSettings[$moduleVar]); - $available = getAvailableModules($scope); - // only return available modules - $ret = array(); - for ($i = 0; $i < sizeof($modules); $i++) { - if (in_array($modules[$i], $available)) $ret[] = $modules[$i]; + if (isset($this->typeSettings[$moduleVar])){ + $modules = explode(",", $this->typeSettings[$moduleVar]); + $available = getAvailableModules($scope); + // only return available modules + $ret = array(); + for ($i = 0; $i < sizeof($modules); $i++) { + if (in_array($modules[$i], $available)) $ret[] = $modules[$i]; + } + $this->$moduleVar = implode(",", $ret); } - $this->$moduleVar = implode(",", $ret); } return true; }