Code

Only load those services whose classes are available.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 10:13:34 +0000 (10:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 10:13:34 +0000 (10:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8559 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_serverService.inc

index 338052b7e3b4a6e6b8b681d64ace29ab7cb4c64e..eefcc5a86182b6badeee307346e4f1038102f91b 100644 (file)
@@ -37,15 +37,21 @@ class ServerService extends plugin
     plugin::plugin($config);
     $this->dn= $dn;
     foreach ($config->data['TABS']['SERVERSERVICE'] as $plug){
-      $name= $plug['CLASS'];
-      $this->plugin_names[]= $name;
-      $this->plugins[$name]= new $name($config, $dn);
-      /* Capture all service objectClases, necessary for acl handling */ 
-      if(isset($this->plugins[$name]->objectclasses)){
-        foreach($this->plugins[$name]->objectclasses as $oc){
-          $this->objectclasses[] = $oc;
+
+      if(class_available($plug['CLASS'])){
+
+        $name= $plug['CLASS'];
+        $this->plugin_names[]= $name;
+        $this->plugins[$name]= new $name($config, $dn);
+
+        /* Capture all service objectClases, necessary for acl handling */ 
+        if(isset($this->plugins[$name]->objectclasses)){
+          foreach($this->plugins[$name]->objectclasses as $oc){
+            $this->objectclasses[] = $oc;
+          }
         }
+      }else{
+        echo "missing class ".$plug['CLASS'];
       }
     }
     $this->divList = new divListSystemService($config,$this);