Skip to content

Commit

Permalink
CRM-19830 fix & simplify communication_method through pseudoconstant
Browse files Browse the repository at this point in the history
CRM-19830 removal of special handling for communication_method & long gone fields
  • Loading branch information
eileenmcnaughton committed Feb 23, 2017
1 parent 4b4b4e7 commit 3cbea72
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions CRM/Export/BAO/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,6 @@ public static function exportComponents(
}
}

$multipleSelectFields = array('preferred_communication_method' => 1);

$addPaymentHeader = FALSE;

$paymentDetails = array();
Expand Down Expand Up @@ -868,12 +866,6 @@ public static function exportComponents(
}
$field = $field . '_';

if (array_key_exists($relationField, $multipleSelectFields)) {
$param = array($relationField => $fieldValue);
$names = array($relationField => array('newName' => $relationField, 'groupName' => $relationField));
CRM_Core_OptionGroup::lookupValues($param, $names, FALSE);
$fieldValue = $param[$relationField];
}
if (is_object($relDAO) && $relationField == 'id') {
$row[$field . $relationField] = $relDAO->contact_id;
}
Expand Down Expand Up @@ -949,23 +941,6 @@ public static function exportComponents(
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($field)) {
$row[$field] = CRM_Core_BAO_CustomField::displayValue($fieldValue, $cfID);
}
elseif (array_key_exists($field, $multipleSelectFields)) {
//option group fixes
$paramsNew = array($field => $fieldValue);
if ($field == 'test_tutoring') {
$name = array($field => array('newName' => $field, 'groupName' => 'test'));
// for readers group
}
elseif (substr($field, 0, 4) == 'cmr_') {
$name = array($field => array('newName' => $field, 'groupName' => substr($field, 0, -3)));
}
else {
$name = array($field => array('newName' => $field, 'groupName' => $field));
}
CRM_Core_OptionGroup::lookupValues($paramsNew, $name, FALSE);
$row[$field] = $paramsNew[$field];
}

elseif (in_array($field, array(
'email_greeting',
'postal_greeting',
Expand Down

0 comments on commit 3cbea72

Please sign in to comment.