[-] Core: Fix Shop::addSqlRestrictionOnLang() for module installation

This commit is contained in:
Rémi Gaillard
2013-03-04 14:12:23 +01:00
parent b597555ddf
commit 706e62a888
+4 -1
View File
@@ -943,7 +943,10 @@ class ShopCore extends ObjectModel
public static function addSqlRestrictionOnLang($alias = null, $id_shop = null)
{
if (is_null($id_shop))
$id_shop = Shop::getContextShopID();
$id_shop = (int)Context::getContext()->shop->id;
if (!$id_shop)
$id_shop = (int)Configuration::get('PS_SHOP_DEFAULT');
return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$id_shop.' ';
}