X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Findex.php;h=77c375bc909e773937b1a4bef44171ac5cfd5cf4;hb=4b0ae24d1609910eaaa03f2b5cd2fc0057c5f020;hp=7977dfab03cb46087fa67931475669ce426df3d3;hpb=e5864b698d2004ed06f8f1af0ac160d5ec6228f7;p=gosa.git diff --git a/html/index.php b/html/index.php index 7977dfab0..77c375bc9 100644 --- a/html/index.php +++ b/html/index.php @@ -27,7 +27,7 @@ header("Content-type: text/html; charset=UTF-8"); function displayLogin() { global $smarty,$message,$config,$ssl,$error_collector; - error_reporting(E_ALL); + error_reporting(E_ALL | E_STRICT); /* Fill template with required values */ $username = ""; if(isset($_POST["username"])){ @@ -149,12 +149,7 @@ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){ 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); @@ -366,12 +361,20 @@ if (isset($_SESSION['errors'])){ $smarty->assign("errors", $_SESSION['errors']); } if ($error_collector != ""){ - $smarty->assign("php_errors", $error_collector.""); + $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector).""); } 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= ''; +} +$smarty->assign("focus", $focus); +displayLogin(); // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>