[-] BO : BugFix : #PSTEST-788 : Treeview is now handled with shop context in admin category controller

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13707 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-02-28 17:16:47 +00:00
parent 786e24514a
commit cb87b22f4f
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -781,7 +781,7 @@ class CategoryCore extends ObjectModel
if (!$shop)
$shop = Context::getContext()->shop;
$id_shop = Configuration::get('PS_SHOP_DEFAULT');
$id_shop = $shop->id ? $shop->id : Configuration::get('PS_SHOP_DEFAULT');
$selected_cat = explode(',', str_replace(' ', '', $selected_cat));
$sql = 'SELECT c.`id_category`, c.`level_depth`, cl.`name`, IF((
SELECT COUNT(*)
@@ -806,7 +806,7 @@ class CategoryCore extends ObjectModel
AND cs.`id_shop` = '.(int)$shop->id;
$sql .= '
AND c.`id_parent` = '.(int)$id_parent.'
ORDER BY `position` ASC';
ORDER BY cs.`position` ASC';
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}