diff --git a/html/index.php b/html/index.php
index 17efc37de0ab93edd301916a234d6253d97ebe38..1adcf42ff6d6ed1f65fde5541d1da1bcce127f30 100644 (file)
--- a/html/index.php
+++ b/html/index.php
}
/* If SSL is forced, just forward to the SSL enabled site */
-if ($config->data['MAIN']['FORCESSL'] == 'true'){
+if ($config->data['MAIN']['FORCESSL'] == 'true' && $ssl != ''){
header ("Location: $ssl");
exit;
}
exit();
}
- $ldap->search("(objectClass=*)",array("subschemaSubentry"));
- $attrs= $ldap->fetch();
- if(!count($attrs)){
+ /* Check for schema file presence */
+ require_once("functions_setup.inc");
+ if(!is_schema_readable($config->current['SERVER'],$config->current['ADMIN'],$config->current['PASSWORD'])){
print_red(_("GOsa cannot retrieve information about the installed schema files. Please make sure, that this is possible."));
echo $_SESSION['errors'];
exit();
+ }else{
+ $str = (schema_check($config->current['SERVER'],$config->current['ADMIN'],$config->current['PASSWORD'],0,TRUE));
+ $checkarr = array();
+ foreach($str as $tr){
+ if(isset($tr['needonstartup'])){
+ print_red($tr['msg']."<br>"._("Your ldap setup contains old schema definitions. Please re-run the setup."));
+ print $_SESSION['errors'];
+ exit();
+ }
+ }
}
/* Check for locking area */