From 30e8649f794c194892a9a035210665172548f8a6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 2 Jun 2010 11:39:40 +0000 Subject: [PATCH] Updated schema validation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18834 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 7b864e5b8..697aea85e 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -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(),''); + } } } } -- 2.30.2