From 706e62a888bd0643f1b4da4e56b5a9dec66a1aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 4 Mar 2013 14:12:23 +0100 Subject: [PATCH] [-] Core: Fix Shop::addSqlRestrictionOnLang() for module installation --- classes/shop/Shop.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index f4089b0cb..2f86626b5 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -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.' '; }