Skip to content
Snippets Groups Projects
Commit df5ec56e authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Merge pull request #2223 from lcdservices/CRM-13995

CRM-13995 fix export when merging households
parents 917a9954 2bf55c30
Branches
Tags
No related merge requests found
......@@ -870,13 +870,25 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
$fieldValue = CRM_Utils_Array::value($relationValue, $imProviders);
}
}
// CRM-13995
elseif (in_array($relationField, array(
'email_greeting', 'postal_greeting', 'addressee'))) {
//special case for greeting replacement
$fldValue = "{$relationField}_display";
$fieldValue = $relDAO->$fldValue;
}
elseif ( is_object($relDAO) && $relationField == 'state_province' ) {
$fieldValue = CRM_Core_PseudoConstant::stateProvince($relDAO->state_province_id);
}
else {
$fieldValue = '';
}
$field = $field . '_';
if (is_object($relDAO) && $relationField == 'id') {
$row[$field . $relationField] = $relDAO->contact_id;
} else if ( is_object( $relDAO ) && is_array( $relationValue ) && $relationField == 'location' ) {
}
elseif ( is_object( $relDAO ) && is_array( $relationValue ) && $relationField == 'location' ) {
foreach ($relationValue as $ltype => $val) {
foreach (array_keys($val) as $fld) {
$type = explode('-', $fld);
......@@ -918,12 +930,6 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
$relationQuery[$field]->_options
);
}
elseif (in_array($relationField, array(
'email_greeting', 'postal_greeting', 'addressee'))) {
//special case for greeting replacement
$fldValue = "{$relationField}_display";
$row[$field . $relationField] = $relDAO->$fldValue;
}
else {
//normal relationship fields
// CRM-3157: localise country, region (both have ‘country’ context) and state_province (‘province’ context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment