From f76433bd7ae4fe3625b619c65cca1b15819ca74f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 4 Jan 2007 15:15:41 +0000 Subject: [PATCH] Nouvelle gestion d'erreur --- htdocs/product/fiche.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 83c239c2d9f..09bdf7d1312 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -91,22 +91,22 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer) $product->new_weight_units = $_POST["weight_units"]; // MultiPrix if($conf->global->PRODUIT_MULTIPRICES == 1) - { - for($i=2;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++) - { - if($_POST["price_".$i]) - { - $price = ereg_replace(" ","", $_POST["price_".$i]); - $price = ereg_replace(",",".", $price); - $product->multiprices["$i"] = $price; + { + for($i=2;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++) + { + if($_POST["price_".$i]) + { + $price = ereg_replace(" ","", $_POST["price_".$i]); + $price = ereg_replace(",",".", $price); + $product->multiprices["$i"] = $price; $product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i]; - } - else - { - $product->multiprices["$i"] = ""; - } - } - } + } + else + { + $product->multiprices["$i"] = ""; + } + } + } if ( $value != $current_lang ) $e_product = $product; @@ -122,7 +122,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer) } else { - $mesg='
'.$product->error.'
'; + $mesg='
'.$langs->trans($product->error()).'
'; $_GET["action"] = "create"; $_GET["canvas"] = $product->canvas; $_GET["type"] = $_POST["type"];