From: hickert Date: Tue, 25 May 2010 12:05:18 +0000 (+0000) Subject: display schema problems in a single dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d6c14bd5b34b7721593cd1b97eebff5bfc865922;p=gosa.git display schema problems in a single dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18684 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 6bf66a195..8f882a58e 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -74,28 +74,34 @@ class configRegistry{ } // Check schema requirements now + $missing = $invalid = array(); foreach($this->pluginRequirements['ldapSchema'] as $cname => $requirements){ foreach($requirements as $oc => $version){ if(!$this->ocAvailable($oc)){ - if($displayMessage){ - msg_dialog::display(_("Schema validation error"), - sprintf(_("The objectClass '%s' which is required for plugin '%s' is not availabe!"), - bold($oc),bold($cname)), - ERROR_DIALOG); - } + $missing[] = $oc; }elseif(!empty($version)){ - $currentVersion = $this->getObjectClassVersion($oc); if(!empty($currentVersion) && !$this->ocVersionMatch($version, $currentVersion)){ - if($displayMessage){ - msg_dialog::display(_("Schema validation error"), - sprintf(_("The objectClass '%s' which is required for plugin '%s' has version %s but %s is required!"),bold($oc),bold($cname),bold($currentVersion),bold($version)), - ERROR_DIALOG); + if($currentVersion == -1){ + $currentVersion = _("unknown"); } + $invalid[] = sprintf(_("%s has version %s but %s required!"), bold($oc),bold($currentVersion),bold($version)); } } } } + + if($displayMessage && count($missing)){ + msg_dialog::display(_("Schema validation error"), + sprintf(_("The following objectClasses are missing! %s"), msgPool::buildList($missing)), + ERROR_DIALOG); + } + if($displayMessage && count($invalid)){ + msg_dialog::display(_("Schema validation error"), + sprintf(_("The following objectClasses do not match the version requirements! %s"), msgPool::buildList($invalid)), + ERROR_DIALOG); + } + $this->schemaCheckFinished =TRUE; }