From b0a5267fabdcaebb1064bc52526e2b95c576b46e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Jun 2006 19:53:55 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Gestion=20erreur=20sur=20cr=E9ation=20pr?= =?UTF-8?q?oduit=20en=20double?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 37de0243aba..313103db0b0 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -114,6 +114,7 @@ class Product */ function create($user) { + global $langs; $this->ref = trim(sanitize_string($this->ref)); @@ -175,13 +176,15 @@ class Product } else { - $this->error=$this->db->error()." - ".$sql; + $this->error=$this->db->error()." - sql=".$sql; $this->db->rollback(); return -3; } } else { + // Produit existe deja + $this->error=$langs->trans("ErrorProductAlreadyExists"); $this->db->rollback(); return -2; }