From 962a641bd90dd638c74e6f767708b54f9e47809d Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 21 May 2012 16:51:09 +0000 Subject: [PATCH] // Fix multishop on Category->getChildrenWithNbSelectedSubCat() (best name ever) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15543 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Category.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/classes/Category.php b/classes/Category.php index 7c24a61d0..f3229ab9b 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -804,18 +804,13 @@ class CategoryCore extends ObjectModel FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl'); if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) - $sql .= ' - LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')'; - $sql .= ' - WHERE `id_lang` = '.(int)$id_lang; + $sql .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')'; + $sql .= ' WHERE `id_lang` = '.(int)$id_lang; if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) - $sql .= ' - AND cs.`id_shop` = '.(int)$shop->id; - $sql .= ' - AND c.`id_parent` = '.(int)$id_parent; + $sql .= ' AND cs.`id_shop` = '.(int)$shop->id; + $sql .= ' AND c.`id_parent` = '.(int)$id_parent; if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) - $sql .= ' - ORDER BY cs.`position` ASC'; + $sql .= ' ORDER BY cs.`position` ASC'; return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); }