From 3eb593daa4842a3200f5b853f6004ea9747249b9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 11 Mar 2012 19:29:06 +0000 Subject: [PATCH] filter non-existing types --- lam/lib/config.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 63198962..9c8dc8ef 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -346,6 +346,16 @@ class LAMConfig { } 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 $scopes = $this->get_ActiveTypes(); for ($s = 0; $s < sizeof($scopes); $s++) {