// 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;
}
+1 -1
View File
@@ -304,7 +304,7 @@ class FrontControllerCore extends Controller
'come_from' => Tools::getHttpHost(true, true).Tools::htmlentitiesUTF8(str_replace('\'', '', urldecode($_SERVER['REQUEST_URI']))),
'cart_qties' => (int)$cart->nbProducts(),
'currencies' => Currency::getCurrencies(),
'languages' => Language::getLanguages(),
'languages' => Language::getLanguages(true, $this->context->shop->getID()),
'priceDisplay' => Product::getTaxCalculationMethod(),
'add_prod_display' => (int)Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'shop_name' => Configuration::get('PS_SHOP_NAME'),