From ed6270ba3e6393e1fa1aa40dc59f6f849fe769f3 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 27 Jul 2012 12:36:02 +0000 Subject: [PATCH] [-] BO : fixed bug #PSCFV-3383 --- controllers/admin/AdminCategoriesController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index cfabea6e7..e3e0079f6 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -568,9 +568,9 @@ class AdminCategoriesControllerCore extends AdminController public function processFatherlessProducts($id_parent) { $all_product_asso = array(); - $tmp = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'category_product`'); + $tmp = Db::getInstance()->executeS('SELECT DISTINCT(`id_product`) FROM `'._DB_PREFIX_.'category_product`'); foreach ($tmp as $val) - $all_product_asso[] = $val; + $all_product_asso[] = $val['id_product']; /* Delete or link products which were not in others categories */ $fatherless_products = new Collection('Product', Context::getContext()->language->id);