Commit 7799da7c authored by eileen's avatar eileen

CRM-19815 Fix misdisplay of gender on drupal user-view page

Note that the click-throughs still do not work but this turns out to be
a pre-existing issue so I will leave that for a follow up
parent 897cbaf1
......@@ -515,6 +515,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
),
'skipDisplay' => 0,
'data_type' => CRM_Utils_Type::getDataTypeFromFieldMetadata($fieldMetaData),
'bao' => CRM_Utils_Array::value('bao', $fieldMetaData),
);
$formattedField = CRM_Utils_Date::addDateMetadataToField($fieldMetaData, $formattedField);
......@@ -1077,19 +1078,6 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
$idx = $name . '_id';
$params[$index] = $details->$idx;
}
elseif ($name === 'preferred_communication_method') {
$communicationFields = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'preferred_communication_method');
$compref = array();
$pref = explode(CRM_Core_DAO::VALUE_SEPARATOR, $details->$name);
foreach ($pref as $k) {
if ($k) {
$compref[] = $communicationFields[$k];
}
}
$params[$index] = $details->$name;
$values[$index] = implode(',', $compref);
}
elseif ($name === 'preferred_language') {
$params[$index] = $details->$name;
$values[$index] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', 'preferred_language', $details->$name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment