// Fix multilang on multishop #PSTEST-588

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12923 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-02-02 10:27:58 +00:00
parent aa35ada6a9
commit 4197ae40dc
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -685,7 +685,11 @@ class LanguageCore extends ObjectModel
public static function countActiveLanguages()
{
if (!self::$countActiveLanguages)
self::$countActiveLanguages = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` WHERE `active` = 1');
self::$countActiveLanguages = Db::getInstance()->getValue('
SELECT COUNT(*) FROM `'._DB_PREFIX_.'lang` l
'.Context::getContext()->shop->addSqlAssociation('lang', 'l').'
WHERE l.`active` = 1
');
return self::$countActiveLanguages;
}