Bugs fixes

This commit is contained in:
dignajar 2015-08-27 20:18:03 -03:00
parent 75d350046a
commit 47fecc0d9c
1 changed files with 4 additions and 3 deletions

View File

@ -69,8 +69,9 @@ include(PATH_KERNEL.'dblanguage.class.php');
include(PATH_HELPERS.'log.class.php'); include(PATH_HELPERS.'log.class.php');
include(PATH_HELPERS.'date.class.php'); include(PATH_HELPERS.'date.class.php');
// Load language // Try detect locale/language from HTTP
$localeFromHTTP = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); $explode = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
$localeFromHTTP = empty($explode[0])?'en_US':str_replace('-', '_', $explode[0]);
if(isset($_GET['language'])) { if(isset($_GET['language'])) {
$localeFromHTTP = Sanitize::html($_GET['language']); $localeFromHTTP = Sanitize::html($_GET['language']);
@ -240,7 +241,7 @@ function install($adminPassword, $email)
'title'=>'Bludit', 'title'=>'Bludit',
'slogan'=>'cms', 'slogan'=>'cms',
'description'=>'', 'description'=>'',
'footer'=>'', 'footer'=>Date::current('Y'),
'language'=>$Language->getCurrentLocale(), 'language'=>$Language->getCurrentLocale(),
'locale'=>$Language->getCurrentLocale(), 'locale'=>$Language->getCurrentLocale(),
'timezone'=>'UTC', 'timezone'=>'UTC',