Skip to content

Commit

Permalink
[-] FO: Don't auto detect language if it not associated to the shop #…
Browse files Browse the repository at this point in the history
…PSCFV-10273
  • Loading branch information
rGaillard committed Oct 21, 2013
1 parent 8ef22c3 commit 198e752
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions classes/Tools.php
Expand Up @@ -357,13 +357,11 @@ public static function setCookieLanguage($cookie = null)
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;
}
}
}
}

Expand Down

0 comments on commit 198e752

Please sign in to comment.