[-] Core: Fix Shop::addSqlRestrictionOnLang() for module installation
This commit is contained in:
@@ -943,7 +943,10 @@ class ShopCore extends ObjectModel
|
|||||||
public static function addSqlRestrictionOnLang($alias = null, $id_shop = null)
|
public static function addSqlRestrictionOnLang($alias = null, $id_shop = null)
|
||||||
{
|
{
|
||||||
if (is_null($id_shop))
|
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.' ';
|
return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$id_shop.' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user