diff --git a/html/index.php b/html/index.php
index 74591d847f0adeea7f4b7fe9e38ed5ba66fcc455..f11f8514a536c26e8478b966f4d97118a194fe0f 100644 (file)
--- a/html/index.php
+++ b/html/index.php
}
/* Got a formular answer, validate and try to log in */
-if ($_SERVER["REQUEST_METHOD"] == "POST"){
+if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){
/* Reset error messages */
$message= "";
}
/* 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();
+ if(preg_match("/true/i",$config->data['MAIN']['SCHEMA_CHECK'])){
+ 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 */
$ldap->cat($config->current['CONFIG']);
$attrs= $ldap->fetch();
/* Displasy SSL mode warning? */
if ($ssl != "" && $config->data['MAIN']['WARNSSL'] == 'true'){
- $smarty->assign ("ssl", "<b>"._("Warning").":</b> "._("Session will not be encrypted.")." <a style=\"color:red;\" href=\"$ssl\"><b>"._("Enter SSL session")."</b></a>!");
+ $smarty->assign ("ssl", "<b>"._("Warning").":</b> "._("Session will not be encrypted.")." <a style=\"color:red;\" href=\"$ssl\"><b>"._("Enter SSL session")."</b></a>!");
} else {
$smarty->assign ("ssl", "");
}