[-] Core : you must always have an id_shop in a SQL query, not null

This commit is contained in:
Damien Metzger
2013-02-28 11:44:48 +01:00
parent 18cc4f2d7c
commit 74bcfeecf0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -943,7 +943,7 @@ class ShopCore extends ObjectModel
public static function addSqlRestrictionOnLang($alias = null, $id_shop = null)
{
if (is_null($id_shop))
$id_shop = Context::getContext()->shop->id;
$id_shop = Shop::getContextShopID();
return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$id_shop.' ';
}
+1 -1
View File
@@ -82,7 +82,7 @@ class Loyalty extends Module
Configuration::updateValue('PS_LOYALTY_VOUCHER_DETAILS', $conf);
$category_config = '';
$categories = Category::getSimpleCategories((int)(Configuration::get('PS_LANG_DEFAULT')));
$categories = Category::getSimpleCategories((int)Configuration::get('PS_LANG_DEFAULT'));
foreach ($categories as $category)
$category_config .= (int)$category['id_category'].',';
$category_config = rtrim($category_config, ',');