From: hickert Date: Wed, 26 May 2010 06:19:04 +0000 (+0000) Subject: Added mechanisms to disable/deactivate plugins if requirements are not fulfilled. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee4b43becd604a9234b23a9b6faab3ca7bdf2631;p=gosa.git Added mechanisms to disable/deactivate plugins if requirements are not fulfilled. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18698 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 33b033b69..db6d30fb7 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -97,7 +97,7 @@ class configRegistry{ $failure = FALSE; if(isset($requirements['ldapSchema'])){ foreach($requirements['ldapSchema'] as $oc => $version){ - if(!$this->ocAvailable($oc)){ + if(1 || !$this->ocAvailable($oc)){ $this->detectedSchemaIssues['missing'][] = $oc; $this->schemaCheckFailed = TRUE; $failure = TRUE; @@ -119,14 +119,21 @@ class configRegistry{ // Display corresponding plugins now if($disableIncompatiblePlugins && $failure && isset($requirements['onFailureDisablePlugin'])){ foreach($requirements['onFailureDisablePlugin'] as $name){ - $this->pluginsDeactivated[] = $name; + $this->pluginsDeactivated[$name] = $name; } } } $this->schemaCheckFinished =TRUE; + session::un_set('plist'); return(!$this->schemaCheckFailed); } + + function getDisabledPlugins() + { + return($this->pluginsDeactivated); + } + function displayErrors() { diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 0f89f3b61..3bf9caa74 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -186,10 +186,13 @@ class pluglist } } + $disabledPlugins = $this->config->configRegistry->getDisabledPlugins(); + $cfg= $this->config->data['MENU']; $menu = "\n