From d8d462e36f2c5a64f0909ba58a8f407ec028edaa Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 27 Apr 2019 14:53:14 +0200 Subject: [PATCH] FIX: dolibarrize civility for fetch member same code as contact or other object --- htdocs/adherents/class/adherent.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 201b6610817..5b446ceb047 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1223,7 +1223,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.gender, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; + $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_code, d.gender, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; $sql.= " d.note_public,"; $sql.= " d.email, d.skype, d.twitter, d.facebook, d.linkedin, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; @@ -1267,7 +1267,11 @@ class Adherent extends CommonObject $this->ref = $obj->rowid; $this->id = $obj->rowid; $this->ref_ext = $obj->ref_ext; - $this->civility_id = $obj->civility_id; + + $this->civility_id = $obj->civility_code; + $this->civility_code = $obj->civility_code; + $this->civility = $obj->civility_code?($langs->trans("Civility".$obj->civility_code) != ("Civility".$obj->civility_code) ? $langs->trans("Civility".$obj->civility_code) : $obj->civility_code):''; + $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; $this->gender = $obj->gender;