multi type support
This commit is contained in:
parent
769aea44ba
commit
fe21487a3b
|
@ -660,17 +660,17 @@ class LAMConfig {
|
||||||
$allTypes = LAM\TYPES\getTypes();
|
$allTypes = LAM\TYPES\getTypes();
|
||||||
$activeTypes = $this->get_ActiveTypes();
|
$activeTypes = $this->get_ActiveTypes();
|
||||||
for ($i = 0; $i < sizeof($activeTypes); $i++) {
|
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]);
|
unset($activeTypes[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$activeTypes = array_values($activeTypes);
|
$activeTypes = array_values($activeTypes);
|
||||||
$this->set_ActiveTypes($activeTypes);
|
$this->set_ActiveTypes($activeTypes);
|
||||||
// check modules
|
// check modules
|
||||||
$scopes = $this->get_ActiveTypes();
|
$types = $this->get_ActiveTypes();
|
||||||
for ($s = 0; $s < sizeof($scopes); $s++) {
|
foreach ($types as $type) {
|
||||||
$scope = $scopes[$s];
|
$scope = \LAM\TYPES\getScopeFromTypeId($type);
|
||||||
$moduleVar = "modules_" . $scope;
|
$moduleVar = "modules_" . $type;
|
||||||
if (isset($this->typeSettings[$moduleVar])){
|
if (isset($this->typeSettings[$moduleVar])){
|
||||||
$modules = explode(",", $this->typeSettings[$moduleVar]);
|
$modules = explode(",", $this->typeSettings[$moduleVar]);
|
||||||
$available = getAvailableModules($scope);
|
$available = getAvailableModules($scope);
|
||||||
|
|
Loading…
Reference in New Issue