added Pavel's patch
This commit is contained in:
		
							parent
							
								
									d35db4062f
								
							
						
					
					
						commit
						4f46c325a0
					
				|  | @ -3,7 +3,7 @@ | ||||||
| $Id$ | $Id$ | ||||||
| 
 | 
 | ||||||
|   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) |   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 |   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 |   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++) { | 		for ($s = 0; $s < sizeof($scopes); $s++) { | ||||||
| 			$scope = $scopes[$s]; | 			$scope = $scopes[$s]; | ||||||
| 			$moduleVar = "modules_" . $scope; | 			$moduleVar = "modules_" . $scope; | ||||||
| 			$modules = explode(",", $this->typeSettings[$moduleVar]); | 			if (isset($this->typeSettings[$moduleVar])){ | ||||||
| 			$available = getAvailableModules($scope); | 				$modules = explode(",", $this->typeSettings[$moduleVar]); | ||||||
| 			// only return available modules
 | 				$available = getAvailableModules($scope); | ||||||
| 			$ret = array(); | 				// only return available modules
 | ||||||
| 			for ($i = 0; $i < sizeof($modules); $i++) { | 				$ret = array(); | ||||||
| 				if (in_array($modules[$i], $available)) $ret[] = $modules[$i]; | 				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; | 		return true; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue