[-] BO : BugFix : #PSCFV-2761 : Change a default language by shop is not possible
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15966 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+5
-1
@@ -377,7 +377,11 @@ class ToolsCore
|
||||
$context = Context::getContext();
|
||||
|
||||
// update language only if new id is different from old id
|
||||
if (($id_lang = (int)Tools::getValue('id_lang')) && Validate::isUnsignedId($id_lang) && $context->cookie->id_lang != (int)$id_lang)
|
||||
// or if default language changed
|
||||
$cookie_id_lang = $context->cookie->id_lang;
|
||||
$configuration_id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $context->shop->id);
|
||||
if ((($id_lang = (int)Tools::getValue('id_lang')) && Validate::isUnsignedId($id_lang) && $cookie_id_lang != (int)$id_lang)
|
||||
|| (($id_lang = $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang))
|
||||
{
|
||||
$context->cookie->id_lang = $id_lang;
|
||||
$language = new Language($id_lang);
|
||||
|
||||
Reference in New Issue
Block a user