From c0cab3f834b487c91d0943dc49204c6d9c3ba090 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 14 Jun 2009 10:29:01 +0000 Subject: [PATCH] "improved default preferences - setting country from lang - setting dateformat for lang != en to 'd.m.Y' - setting curreny for lang != en to 'EUR'" --- setup/admin_account.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup/admin_account.php b/setup/admin_account.php index 576aba8737..4c64f623c1 100644 --- a/setup/admin_account.php +++ b/setup/admin_account.php @@ -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, ),