[-] FO: Don't auto detect language if it not associated to the shop #PSCFV-10273

This commit is contained in:
Rémi Gaillard
2013-10-21 09:41:00 +02:00
parent 8ef22c3548
commit 198e75245d
+4 -6
View File
@@ -357,13 +357,11 @@ class ToolsCore
if (Validate::isLanguageIsoCode($string))
{
$lang = new Language(Language::getIdByIso($string));
if (Validate::isLoadedObject($lang) && $lang->active)
{
$language = new Language((int)$lang->id);
if (Validate::isLoadedObject($language))
Context::getContext()->language = $language;
if (Validate::isLoadedObject($lang) && $lang->active && $lang->isAssociatedToShop())
{
Context::getContext()->language = $lang;
$cookie->id_lang = (int)$lang->id;
}
}
}
}