From d3af4397a9bebd29dc4dd3370f16e97fce290262 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 10 Aug 2004 14:43:23 +0000 Subject: [PATCH] =?UTF-8?q?Retour=20code=20d'erreur=20sur=20doublon=20de?= =?UTF-8?q?=20r=E9f=E9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 67b3c733d40..a37e5333f56 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -73,8 +73,9 @@ class Product */ function create($user) { - $this->ref = ereg_replace("'","",stripslashes($this->ref)); - $this->ref = ereg_replace("\"","",stripslashes($this->ref)); + $this->ref = ereg_replace("'","",stripslashes($this->ref)); + $this->ref = ereg_replace("\"","",stripslashes($this->ref)); + $sql = "SELECT count(*)"; $sql .= " FROM ".MAIN_DB_PREFIX."product WHERE ref = '" .trim($this->ref)."'"; @@ -119,8 +120,12 @@ class Product return -1; } } + else + { + return -3; + } } - } + } /** * *