"improved default preferences

- setting country from lang
- setting dateformat for lang != en to 'd.m.Y'
- setting curreny for lang != en to 'EUR'"
This commit is contained in:
Ralf Becker 2009-06-14 10:29:01 +00:00
parent 0ada07748c
commit c0cab3f834

View File

@ -137,6 +137,10 @@ else
// give admin access to default apps, not yet set for the default group
function insert_default_prefs($accountid)
{
$lang = get_var('ConfigLang',Array('POST','COOKIE'),'en');
list(,$country) = explode('-',$lang);
if (empty($country)) $country = $lang;
$defaultprefs = array(
'common' => array(
'maxmatchs' => 15,
@ -144,11 +148,12 @@ else
'theme' => 'idots',
'navbar_format' => 'icons',
'tz_offset' => 0,
'dateformat' => 'Y/m/d',
'dateformat' => $lang == 'en' ? 'Y/m/d' : 'd.m.Y',
'timeformat' => '24',
'lang' => get_var('ConfigLang',Array('POST','COOKIE'),'en'),
'lang' => $lang,
'country' => strtoupper($country),
'default_app' => 'calendar',
'currency' => '$',
'currency' => $lang == 'en' ? '$' : 'EUR',
'show_help' => True,
'max_icons' => 12,
),