diff --git a/html/main.php b/html/main.php
index f95af8a5a5cadbc6fa57652cc15030dee7c128d1..f9c2cc6e7d93e4517ce3ad36fb592389b0ad034e 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Set header */
header("Content-type: text/html; charset=UTF-8");
/* 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");
/* Set the text domain as 'messages' */
$domain = 'messages';
bindtextdomain($domain, "$BASE_DIR/locale");
/* Prepare plugin list */
if (!isset($_SESSION['plist'])){
/* 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;
/* Load ocMapping into userinfo */
$tmp= new acl($config, NULL, $ui->dn);
$ui->ocMapping= $tmp->ocMapping;