[-] Core: Locales should be setted anywhere #PSCFV-5953
This commit is contained in:
@@ -252,12 +252,6 @@ class FrontControllerCore extends Controller
|
||||
CartRule::autoAddToCart($this->context);
|
||||
}
|
||||
|
||||
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');
|
||||
setlocale(LC_COLLATE, $locale);
|
||||
setlocale(LC_CTYPE, $locale);
|
||||
setlocale(LC_TIME, $locale);
|
||||
setlocale(LC_NUMERIC, 'en_US.UTF-8');
|
||||
|
||||
/* get page name to display it in body id */
|
||||
|
||||
// Are we in a payment module
|
||||
@@ -1144,12 +1138,12 @@ class FrontControllerCore extends Controller
|
||||
* @return array
|
||||
*/
|
||||
public function initLogoAndFavicon()
|
||||
{
|
||||
return array(
|
||||
'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'),
|
||||
{
|
||||
return array(
|
||||
'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'),
|
||||
'logo_image_width' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_WIDTH') : Configuration::get('SHOP_LOGO_MOBILE_WIDTH')),
|
||||
'logo_image_height' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_HEIGHT') : Configuration::get('SHOP_LOGO_MOBILE_HEIGHT')),
|
||||
'logo_url' => ($this->context->getMobileDevice() == false ? _PS_IMG_.Configuration::get('PS_LOGO').'?'.Configuration::get('PS_IMG_UPDATE_TIME') : _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?'.Configuration::get('PS_IMG_UPDATE_TIME'))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,13 @@ Context::getContext()->country = $defaultCountry;
|
||||
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
|
||||
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
|
||||
|
||||
/* Set locales */
|
||||
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');
|
||||
setlocale(LC_COLLATE, $locale);
|
||||
setlocale(LC_CTYPE, $locale);
|
||||
setlocale(LC_TIME, $locale);
|
||||
setlocale(LC_NUMERIC, 'en_US.UTF-8');
|
||||
|
||||
/* Instantiate cookie */
|
||||
|
||||
|
||||
@@ -122,7 +129,7 @@ else
|
||||
else
|
||||
{
|
||||
$domains = null;
|
||||
if(Context::getContext()->shop->domain != Context::getContext()->shop->domain_ssl)
|
||||
if (Context::getContext()->shop->domain != Context::getContext()->shop->domain_ssl)
|
||||
$domains = array(Context::getContext()->shop->domain_ssl, Context::getContext()->shop->domain);
|
||||
|
||||
$cookie = new Cookie('ps-s'.Context::getContext()->shop->id, '', $cookie_lifetime, $domains);
|
||||
@@ -153,7 +160,7 @@ else
|
||||
{
|
||||
$customer = new Customer();
|
||||
|
||||
// Change the default group
|
||||
// Change the default group
|
||||
if (Group::isFeatureActive())
|
||||
$customer->id_default_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user