From b7b65701fff6d539fcb73a91da5c7e14a4dd4a84 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Wed, 22 Mar 2006 06:25:28 +0000 Subject: [PATCH] debug : empecher association pere-fils<->fils-pere --- htdocs/product/sousproduits/fiche.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 598f5900072..0571bc90439 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -77,14 +77,15 @@ if ($action == 'add_prod' && // print "
: ".$_POST["prod_id_chk".$i]; if($_POST["prod_id_chk".$i] != "") { - if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) ) + if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) > 0) { $action = 'edit'; } else { $action = 're-edit'; - $mesg = "erreur"; + if($product->error == "isFatherOfThis") + $mesg = $langs->trans("ErrorAssociationIsFatherOfThis"); } } else @@ -96,7 +97,6 @@ if ($action == 'add_prod' && else { $action = 're-edit'; - $mesg = "erreur"; }