Fix: le champ vide de la liste déroulante était à 1 ce qui pouvait attribuer un contact invalide

This commit is contained in:
Regis Houssin 2007-11-22 18:20:20 +00:00
parent 00014d910e
commit f44a0db145
2 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer)
if ($_POST["contactidp"]) if ($_POST["contactidp"])
{ {
$result=$propal->add_contact($_POST["contactidp"],'CUSTOMER','external'); $result=$propal->add_contact($_POST["contactidp"],'CUSTOMER','external');
if ($result > 0) if ($result > 0)
{ {
$error=0; $error=0;

View File

@ -819,7 +819,7 @@ class Form
if ($num == 0) return 0; if ($num == 0) return 0;
if ($htmlname != 'none') print '<select class="flat" name="'.$htmlname.'">'; if ($htmlname != 'none') print '<select class="flat" name="'.$htmlname.'">';
if ($showempty) print '<option value="1">&nbsp;</option>'; if ($showempty) print '<option value="0">&nbsp;</option>';
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $i = 0;
if ($num) if ($num)