filter non-existing types

This commit is contained in:
Roland Gruber 2012-03-11 19:29:06 +00:00
parent 52ca63ae28
commit 3eb593daa4
1 changed files with 10 additions and 0 deletions

View File

@ -346,6 +346,16 @@ class LAMConfig {
} }
fclose($file); fclose($file);
} }
// check types
$allTypes = getTypes();
$activeTypes = $this->get_ActiveTypes();
for ($i = 0; $i < sizeof($activeTypes); $i++) {
if (!in_array($activeTypes[$i], $allTypes)) {
unset($activeTypes[$i]);
}
}
$activeTypes = array_values($activeTypes);
$this->set_ActiveTypes($activeTypes);
// check modules // check modules
$scopes = $this->get_ActiveTypes(); $scopes = $this->get_ActiveTypes();
for ($s = 0; $s < sizeof($scopes); $s++) { for ($s = 0; $s < sizeof($scopes); $s++) {