diff --git a/html/index.php b/html/index.php
index f57227ddd4336cc1fa29599348cd102d67a0ba98..a4fec5c67ea4dfae6f6d8a1fc6a4a922cb96df99 100644 (file)
--- a/html/index.php
+++ b/html/index.php
exit();
}
-/* Reset errors */
-$_SESSION['errors']= "";
-
/* Check for java script */
if(isset($_POST['javascript']) && $_POST['javascript'] == "true") {
$_SESSION['js']= TRUE;
/* Check for old files in compile directory */
clean_smarty_compile_dir($smarty->compile_dir);
-/* Language setup */
-if ($config->data['MAIN']['LANG'] == ""){
- $lang= get_browser_language();
-} else {
- $lang= $config->data['MAIN']['LANG'];
-}
-$lang.=".UTF-8";
+$lang= get_browser_language();
putenv("LANGUAGE=");
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
/* Check for valid input */
$username= $_POST["username"];
- if (!ereg("^[A-Za-z0-9_.-]+$", $username)){
+ if (!ereg("^[@A-Za-z0-9_.-]+$", $username)){
$message= _("Please specify a valid username!");
} elseif (mb_strlen($_POST["password"], 'UTF-8') == 0){
$message= _("Please specify your password!");
$smarty->assign("php_errors", "");
}
-/* 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:
+
?>
</body>