From 47fecc0d9c3f7b2cbb0198beefc7af54ec7a999e Mon Sep 17 00:00:00 2001 From: dignajar Date: Thu, 27 Aug 2015 20:18:03 -0300 Subject: [PATCH] Bugs fixes --- install.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.php b/install.php index 912aa3f5..e0ac53f7 100755 --- a/install.php +++ b/install.php @@ -69,8 +69,9 @@ include(PATH_KERNEL.'dblanguage.class.php'); include(PATH_HELPERS.'log.class.php'); include(PATH_HELPERS.'date.class.php'); -// Load language -$localeFromHTTP = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']); +// Try detect locale/language from HTTP +$explode = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); +$localeFromHTTP = empty($explode[0])?'en_US':str_replace('-', '_', $explode[0]); if(isset($_GET['language'])) { $localeFromHTTP = Sanitize::html($_GET['language']); @@ -240,7 +241,7 @@ function install($adminPassword, $email) 'title'=>'Bludit', 'slogan'=>'cms', 'description'=>'', - 'footer'=>'', + 'footer'=>Date::current('Y'), 'language'=>$Language->getCurrentLocale(), 'locale'=>$Language->getCurrentLocale(), 'timezone'=>'UTC',