Merge pull request #590 from marcosgdf/3.3

Fix bug in Adherent class not saving civilite=0
This commit is contained in:
Laurent Destailleur 2013-01-10 12:09:23 -08:00
commit 3c6e4bc267

View File

@ -423,7 +423,7 @@ class Adherent extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".($this->civilite_id?"'".$this->civilite_id."'":"null");
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null");
$sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
$sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");