From: kurund Date: Tue, 13 Aug 2013 10:23:13 +0000 (+0530) Subject: CRM-13214, fixed notices and now it also exports correct values X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a77049fbb76cd710fe0412f20705e64faaa2e962;p=civicrm-core.git CRM-13214, fixed notices and now it also exports correct values ---------------------------------------- * CRM-13214: Activity Export : Primary Fields - notices on renamed pseudoconstants (gender, suffix, prefix) http://issues.civicrm.org/jira/browse/CRM-13214 --- diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index b6e6f79cc8..ee049d0181 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -801,16 +801,8 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c elseif ($field == 'pledge_next_pay_amount') { $row[$field] = $dao->pledge_next_pay_amount + $dao->pledge_outstanding_amount; } - elseif ($field == 'prefix_id' || $field == 'suffix_id' || $field == 'gender_id') { - if ($field == 'prefix_id') { - $row[$field] = $dao->individual_prefix; - } - elseif ($field == 'suffix_id') { - $row[$field] = $dao->individual_suffix; - } - else { - $row[$field] = $dao->gender; - } + elseif (in_array(substr($field, 0, -3), array('gender', 'prefix', 'suffix'))) { + $row[$field] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', $field, $dao->$field); } elseif (is_array($value) && $field == 'location') { // fix header for location type case