Retour code d'erreur sur doublon de rfrence
This commit is contained in:
parent
b587cb7fc2
commit
d3af4397a9
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user