1) sending a content-type header to overwrite apaches default charset

2) submitting the form, if someone changes the language after entering user and password
This commit is contained in:
Ralf Becker 2005-03-03 09:01:24 +00:00
parent 4e9a7478c1
commit bdbb84975a

View File

@ -398,6 +398,8 @@
}
}
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
header('Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset());
$GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
@ -436,7 +438,7 @@
/* language section if activated in site config */
if (@$GLOBALS['phpgw_info']['server']['login_show_language_selection'])
{
$select_lang = '<select name="lang" onchange="'."location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';
$select_lang = '<select name="lang" onchange="'."if (this.form.login.value && this.form.passwd.value) this.form.submit(); else location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';
$langs = $GLOBALS['phpgw']->translation->get_installed_langs();
uasort($langs,'strcasecmp');
foreach ($langs as $key => $name) // if we have a translation use it