From fd9df3ace10eeeee3700f7feaa200aa54947d902 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Mar 2004 16:53:25 +0000 Subject: [PATCH] =?UTF-8?q?Renvoi=20erreur=20=E0=20la=20cr=E9ation=20d=E9p?= =?UTF-8?q?ot=20si=20le=20nom=20non=20saisie.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/stock/entrepot.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/product/stock/entrepot.class.php b/htdocs/product/stock/entrepot.class.php index 0c8883b53d4..2186bbc3e3a 100644 --- a/htdocs/product/stock/entrepot.class.php +++ b/htdocs/product/stock/entrepot.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +43,12 @@ class Entrepot */ Function create($user) { + // Si libelle non defini, erreur + if ($this->libelle == '') { + $this->mesg_error = "Libellé obligatoire"; + return 0; + } + if ($this->db->query("BEGIN") ) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (datec, fk_user_author)";