From 3994038d9efda8ea5f653640cc10485ab0b0cd55 Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 29 Feb 2012 10:15:23 +0000 Subject: [PATCH] // category treeview in "all" context shop fix --- classes/Category.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Category.php b/classes/Category.php index 090391439..7672383e9 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -805,8 +805,10 @@ class CategoryCore extends ObjectModel $sql .= ' AND cs.`id_shop` = '.(int)$shop->id; $sql .= ' - AND c.`id_parent` = '.(int)$id_parent.' - ORDER BY cs.`position` ASC'; + AND c.`id_parent` = '.(int)$id_parent; + if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) + $sql .= ' + ORDER BY cs.`position` ASC'; return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); }