Code

Updated schema validation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jun 2010 11:39:40 +0000 (11:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jun 2010 11:39:40 +0000 (11:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18834 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_configRegistry.inc

index 7b864e5b881aa4f72c06c0b48815ef8dbb79f43d..697aea85e720b48fac20a84e18b6bae03ddb2095 100644 (file)
@@ -138,12 +138,26 @@ class configRegistry{
         foreach($this->classesWithInfo as $cname => $defs){
             if(isset($defs['plRequirements'])){
 
+                // Check only if required plugin is enabled in gosa.conf
+                // Normally this is the class name itself, but may be overridden
+                //  in plInfo using the plRequirements::activePlugin statement.
+                $requiresActivePlugin = $cname;
+                if(isset($defs['plRequirements']['activePlugin'])){
+                    $requiresActivePlugin = $defs['plRequirements']['activePlugin'];
+                }
+
                 // Only queue checks for active plugins. 
-                if(isset($this->activePlugins[strtolower($cname)])){
+                if(isset($this->activePlugins[strtolower($requiresActivePlugin)])){
                     $this->pluginRequirements[$cname] = $defs['plRequirements'];
                 }else{
-                    new log("debug","","Skipped schema check for '{$cname}' plugin is inactive!",
-                        array(),'');
+                    if($cname == $requiresActivePlugin){
+                        new log("debug","","Skipped schema check for '{$cname}' plugin is inactive!",
+                                array(),'');
+                    }else{
+                        new log("debug","","Skipped schema check for class '{$cname}' skipped,".
+                                    " required plugin '{$requiresActivePlugin}' is inactive!",
+                                array(),'');
+                    }
                 }
             }
         }