[-] BO : fixed bug #PSCFV-3338

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16583 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2012-07-26 13:46:19 +00:00
parent db081565c3
commit 13b93ddaef
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -1308,6 +1308,7 @@ class CategoryCore extends ObjectModel
SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang`
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
'.Shop::addSqlAssociation('category', 'c').'
WHERE cl.`id_lang` = '.(int)$id_lang.'
AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).')
');
+1
View File
@@ -2135,6 +2135,7 @@ class ProductCore extends ObjectModel
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT cp.`id_category`, cl.`name`, cl.`link_rewrite` FROM `'._DB_PREFIX_.'category_product` cp
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cp.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').')
'.Shop::addSqlAssociation('category', 'cp').'
WHERE cp.`id_product` = '.(int)$id_product.'
AND cl.`id_lang` = '.(int)$id_lang
);