Fix update
This commit is contained in:
parent
2ce50b6c00
commit
b9649632fa
@ -659,8 +659,7 @@ class Adherent extends CommonObject
|
||||
$nbrowsaffected = 0;
|
||||
$error = 0;
|
||||
|
||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass." nosyncthirdparty=".$nosyncthirdparty.", email=".
|
||||
$this->email);
|
||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass." nosyncthirdparty=".$nosyncthirdparty.", email=".$this->email);
|
||||
|
||||
// Clean parameters
|
||||
$this->lastname = trim($this->lastname) ? trim($this->lastname) : trim($this->lastname);
|
||||
@ -693,7 +692,9 @@ class Adherent extends CommonObject
|
||||
$sql .= ", gender = ".($this->gender != -1 ? "'".$this->db->escape($this->gender)."'" : "null"); // 'man' or 'woman'
|
||||
$sql .= ", login = ".($this->login ? "'".$this->db->escape($this->login)."'" : "null");
|
||||
$sql .= ", societe = ".($this->company ? "'".$this->db->escape($this->company)."'" : ($this->societe ? "'".$this->db->escape($this->societe)."'" : "null"));
|
||||
$sql .= ", fk_soc = ".($this->socid > 0 ? $this->db->escape($this->socid) : "null");
|
||||
if ($this->socid) {
|
||||
$sql .= ", fk_soc = ".($this->socid > 0 ? $this->db->escape($this->socid) : "null"); // Must be modified only when creating from a third-party
|
||||
}
|
||||
$sql .= ", address = ".($this->address ? "'".$this->db->escape($this->address)."'" : "null");
|
||||
$sql .= ", zip = ".($this->zip ? "'".$this->db->escape($this->zip)."'" : "null");
|
||||
$sql .= ", town = ".($this->town ? "'".$this->db->escape($this->town)."'" : "null");
|
||||
@ -713,9 +714,6 @@ class Adherent extends CommonObject
|
||||
$sql .= ", fk_adherent_type = ".$this->db->escape($this->typeid);
|
||||
$sql .= ", morphy = '".$this->db->escape($this->morphy)."'";
|
||||
$sql .= ", birth = ".($this->birth ? "'".$this->db->idate($this->birth)."'" : "null");
|
||||
if ($this->socid) {
|
||||
$sql .= ", fk_soc = '".$this->db->escape($this->socid)."'"; // Must be modified only when creating from a third-party
|
||||
}
|
||||
if ($this->datefin) {
|
||||
$sql .= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user