Merge branch 'develop' of https://github.com/dolibarr/dolibarr into develop
This commit is contained in:
commit
d750401eb0
@ -253,7 +253,8 @@ if (empty($reshook))
|
||||
}
|
||||
$lastname=$_POST["lastname"];
|
||||
$firstname=$_POST["firstname"];
|
||||
$morphy=$morphy=$_POST["morphy"];
|
||||
$morphy=$_POST["morphy"];
|
||||
$login=$_POST["login"];
|
||||
if ($morphy != 'mor' && empty($lastname)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
@ -264,7 +265,14 @@ if (empty($reshook))
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
|
||||
}
|
||||
|
||||
// Test si le login existe deja
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
if (empty($login)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
|
||||
}
|
||||
}
|
||||
// Create new object
|
||||
if ($result > 0 && ! $error)
|
||||
{
|
||||
|
||||
@ -744,7 +744,8 @@ abstract class CommonObject
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
|
||||
$sql.= " WHERE element_id = ".$this->id;
|
||||
$sql.= " AND fk_c_type_contact IN (".$listId.")";
|
||||
if ($listId)
|
||||
$sql.= " AND fk_c_type_contact IN (".$listId.")";
|
||||
|
||||
dol_syslog(get_class($this)."::delete_linked_contact", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user