Skip to content

Commit

Permalink
FIx display civility in contact card
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Jul 23, 2019
1 parent 239b7d5 commit 46d0137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/contact/class/contact.class.php
Expand Up @@ -345,7 +345,7 @@ public function update($id, $user = null, $notrigger = 0, $action = 'update', $n
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',";
elseif ($this->socid == -1) $sql .= " fk_soc=null,";
$sql .= " civility='".$this->db->escape($this->civility_id)."'";
$sql .= " civility='".$this->db->escape($this->civility)."'";
$sql .= ", lastname='".$this->db->escape($this->lastname)."'";
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
$sql .= ", address='".$this->db->escape($this->address)."'";
Expand Down Expand Up @@ -1218,7 +1218,7 @@ public function getCivilityLabel()
global $langs;
$langs->load("dict");

$code=(! empty($this->civility_id)?$this->civility_id:(! empty($this->civilite_id)?$this->civilite_id:''));
$code=(! empty($this->civility_id)?$this->civility:(! empty($this->civilite)?$this->civilite:''));
if (empty($code)) return '';
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code);
}
Expand Down

0 comments on commit 46d0137

Please sign in to comment.