Merge pull request #13020 from TobiasSekan/FixGenderPhotoInContactCard
[Fix] Missing gender photo in contact card
This commit is contained in:
commit
a11ef1c606
@ -992,17 +992,23 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set property ->gender from property ->civility_id
|
* Set the property "gender" of this class, based on the property "civility_id"
|
||||||
|
* or use property "civility_code" as fallback, when "civility_id" is not available.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setGenderFromCivility()
|
public function setGenderFromCivility()
|
||||||
{
|
{
|
||||||
unset($this->gender);
|
unset($this->gender);
|
||||||
if (in_array($this->civility_id, array('MR'))) {
|
|
||||||
|
if (in_array($this->civility_id, array('MR')) || in_array($this->civility_code, array('MR')))
|
||||||
|
{
|
||||||
$this->gender = 'man';
|
$this->gender = 'man';
|
||||||
} elseif (in_array($this->civility_id, array('MME', 'MLE'))) {
|
}
|
||||||
|
elseif(in_array($this->civility_id, array('MME','MLE')) || in_array($this->civility_code, array('MME','MLE')))
|
||||||
|
{
|
||||||
$this->gender = 'woman';
|
$this->gender = 'woman';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user