From: hickert Date: Wed, 26 May 2010 06:57:28 +0000 (+0000) Subject: Updated Error messages X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4a9cc0ed22fca315f255cce4d28d24e7351fca62;p=gosa.git Updated Error messages -Display all messages in a single dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18700 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index db6d30fb7..df9059f9f 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -97,17 +97,17 @@ class configRegistry{ $failure = FALSE; if(isset($requirements['ldapSchema'])){ foreach($requirements['ldapSchema'] as $oc => $version){ - if(1 || !$this->ocAvailable($oc)){ + if(rand(0,5)==1 || !$this->ocAvailable($oc)){ $this->detectedSchemaIssues['missing'][] = $oc; $this->schemaCheckFailed = TRUE; $failure = TRUE; }elseif(!empty($version)){ $currentVersion = $this->getObjectClassVersion($oc); - if(!empty($currentVersion) && !$this->ocVersionMatch($version, $currentVersion)){ + if(1 || !empty($currentVersion) && !$this->ocVersionMatch($version, $currentVersion)){ if($currentVersion == -1){ $currentVersion = _("unknown"); } - $this->detectedSchemaIssues['versionMismatch'] = + $this->detectedSchemaIssues['versionMismatch'][] = sprintf(_("%s has version %s but %s required!"), bold($oc),bold($currentVersion),bold($version)); $this->schemaCheckFailed = TRUE; $failure = TRUE; @@ -137,22 +137,38 @@ class configRegistry{ function displayErrors() { + + $message = ""; if(count($this->detectedSchemaIssues['missing'])){ - msg_dialog::display(_("Schema validation error"), - _("The following objectClasses are missing:"). - "
". - msgPool::buildList($this->detectedSchemaIssues['missing']). - "
", - ERROR_DIALOG); + $message .= + _("The following objectClasses are missing:"). + "
". + msgPool::buildList($this->detectedSchemaIssues['missing']). + "
"; } if(count($this->detectedSchemaIssues['versionMismatch'])){ - msg_dialog::display(_("Schema validation error"), - _("The following objectClasses do not match the version requirements:"). - "
". - msgPool::buildList($this->detectedSchemaIssues['versionMismatch']). - "
", - ERROR_DIALOG); + $message.= + _("The following objectClasses do not match the version requirements:"). + "
". + msgPool::buildList($this->detectedSchemaIssues['versionMismatch']). + "
"; } + if(count($this->pluginsDeactivated)){ + + $tmp = array(); + foreach($this->pluginsDeactivated as $class){ + $tmp[$class] = (isset($this->classToName[$class]))? $this->classToName[$class] : $class; + } + + $message.= _("Due to unresolved requirements GOsa will deactivate the following plugins:"). + "
". + msgPool::buildList($tmp). + "
"; + } + + if($message != ""){ + msg_dialog::display(_("Schema validation error"),$message, ERROR_DIALOG); + } }