From 5efea3a09219be676356249f3390b7d951944a55 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 21 Mar 2006 15:41:00 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20enlever=20le=20filtre=20cat=E9gorie=20si?= =?UTF-8?q?=20le=20module=20n'est=20pas=20actif?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/sousproduits/fiche.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 02885f6e529..f14fd4ba348 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -101,15 +101,14 @@ if ($action == 'add_prod' && } - } - + } } // action recherche des produits par mot-clé et/ou par catégorie if($action == 'search' ) { $sql = 'SELECT p.rowid, p.ref, p.label, p.price, p.fk_product_type'; $sql.= ' FROM '.MAIN_DB_PREFIX.'product as p'; - if($catMere != -1) + if($conf->categorie->enabled && $catMere != -1) { $sql .= ', '.MAIN_DB_PREFIX.'categorie_product as cp'; } @@ -119,7 +118,7 @@ if($action == 'search' ) $sql .= " AND (p.ref like '%".$key."%'"; $sql .= " OR p.label like '%".$key."%')"; } - if($catMere != -1) + if($conf->categorie->enabled && $catMere != -1) { $sql .= " AND p.rowid=cp.fk_product AND cp.fk_categorie ='".$catMere."'"; } @@ -352,11 +351,11 @@ if ($id || $ref) print ''; print ''; print ''; - print ''; - print ''.$langs->trans("CategoryFilter"); - - if($conf->categorie->enabled) + print ''; + + if($conf->categorie->enabled) { + print ''.$langs->trans("CategoryFilter"); print ''.$html->select_all_categories($catMere).''; }