multi type support

This commit is contained in:
Roland Gruber 2016-12-28 19:53:18 +01:00
parent 769aea44ba
commit fe21487a3b
1 changed files with 5 additions and 5 deletions

View File

@ -660,17 +660,17 @@ class LAMConfig {
$allTypes = LAM\TYPES\getTypes();
$activeTypes = $this->get_ActiveTypes();
for ($i = 0; $i < sizeof($activeTypes); $i++) {
if (!in_array($activeTypes[$i], $allTypes)) {
if (!in_array(\LAM\TYPES\getScopeFromTypeId($activeTypes[$i]), $allTypes)) {
unset($activeTypes[$i]);
}
}
$activeTypes = array_values($activeTypes);
$this->set_ActiveTypes($activeTypes);
// check modules
$scopes = $this->get_ActiveTypes();
for ($s = 0; $s < sizeof($scopes); $s++) {
$scope = $scopes[$s];
$moduleVar = "modules_" . $scope;
$types = $this->get_ActiveTypes();
foreach ($types as $type) {
$scope = \LAM\TYPES\getScopeFromTypeId($type);
$moduleVar = "modules_" . $type;
if (isset($this->typeSettings[$moduleVar])){
$modules = explode(",", $this->typeSettings[$moduleVar]);
$available = getAvailableModules($scope);