diff --git a/html/index.php b/html/index.php
index d9615399a6766d4e1b97c563895c4e7305b5c0af..756d503782033ee7c98f871ab4e123477114ae3c 100644 (file)
--- a/html/index.php
+++ b/html/index.php
$smarty->assign("errors", $_SESSION['errors']);
}
if ($error_collector != ""){
- $smarty->assign("php_errors", $error_collector."</div>");
+ $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector)."</div>");
} else {
$smarty->assign("php_errors", "");
}
$cfg['connection']= $config->current['SERVER'];
$cfg['tls'] = $tls;
- $str = check_schema($cfg,preg_match("/(true|yes|on|1)/i",$config->current['RFC2307BIS']));
+ $str = check_schema($cfg,isset($config->current['RFC2307BIS']) && preg_match("/(true|yes|on|1)/i",$config->current['RFC2307BIS']));
$checkarr = array();
foreach($str as $tr){
/* Login as user, initialize user ACL's */
$ui= ldap_login_user($username, $_POST["password"]);
- if ($ui === NULL || $ui == 0){
+ if ($ui === NULL || !$ui ){
$message= _("Please check the username/password combination.");
$smarty->assign ('nextfield', 'password');
gosa_log ("Authentication failed for user \"$username\"");
} else {
$smarty->assign("php_errors", "");
}
-displayLogin();
+/* Set focus to the error button if we've an error message */
+$focus= "";
+if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
+ $focus= '<script language="JavaScript" type="text/javascript">';
+ $focus.= 'document.forms[0].error_accept.focus();';
+ $focus.= '</script>';
+}
+$smarty->assign("focus", $focus);
+displayLogin();
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>