From a77049fbb76cd710fe0412f20705e64faaa2e962 Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 13 Aug 2013 15:53:13 +0530 Subject: [PATCH] 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 --- CRM/Export/BAO/Export.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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 -- 2.25.1