X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Fmain.php;h=f9c2cc6e7d93e4517ce3ad36fb592389b0ad034e;hb=96a9229b8cbcda886c8c7ab826ae1e1ba3bf97d0;hp=f95af8a5a5cadbc6fa57652cc15030dee7c128d1;hpb=fd8482f50f29a451b5b203b0da7cc2e716100533;p=gosa.git diff --git a/html/main.php b/html/main.php index f95af8a5a..f9c2cc6e7 100644 --- a/html/main.php +++ b/html/main.php @@ -29,9 +29,6 @@ require_once ("functions_FAI.inc"); /* Set header */ header("Content-type: text/html; charset=UTF-8"); -/* Find all class files and include them */ -get_dir_list("$BASE_DIR/plugins"); - /* Set the text domain as 'messages' */ $domain = 'messages'; bindtextdomain($domain, "$BASE_DIR/locale"); @@ -153,8 +150,16 @@ textdomain($domain); /* Prepare plugin list */ if (!isset($_SESSION['plist'])){ - $_SESSION['plist']= new pluglist($config, $ui); + /* Initially load all classes */ + $class_list= get_declared_classes(); + foreach ($class_mapping as $class => $path){ + if (!in_array($class, $class_list)){ + require_once("$BASE_DIR/$path"); + } + } + $_SESSION['plist']= new pluglist($config, $ui); + /* Load ocMapping into userinfo */ $tmp= new acl($config, NULL, $ui->dn); $ui->ocMapping= $tmp->ocMapping;