From f0d5835016da77a5167b7ce61651d69c6df9fac2 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 22 May 2018 22:44:25 +1200 Subject: [PATCH] [NFC] minor variable renaming. I am working through https://github.com/civicrm/civicrm-core/pull/11870/files & this is one very minor change that makes sense to commit in isolation --- CRM/Export/BAO/Export.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 5b7744c301..a7e3292380 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2018 - * $Id$ - * */ /** @@ -2105,9 +2103,10 @@ WHERE {$whereClause}"; $fieldValue = ''; } $field = $field . '_'; + $relPrefix = $field . $relationField; if (is_object($relDAO) && $relationField == 'id') { - $row[$field . $relationField] = $relDAO->contact_id; + $row[$relPrefix] = $relDAO->contact_id; } elseif (is_array($relationValue) && $relationField == 'location') { foreach ($relationValue as $ltype => $val) { @@ -2147,7 +2146,7 @@ WHERE {$whereClause}"; elseif (isset($fieldValue) && $fieldValue != '') { //check for custom data if ($cfID = CRM_Core_BAO_CustomField::getKeyID($relationField)) { - $row[$field . $relationField] = CRM_Core_BAO_CustomField::displayValue($fieldValue, $cfID); + $row[$relPrefix] = CRM_Core_BAO_CustomField::displayValue($fieldValue, $cfID); } else { //normal relationship fields @@ -2155,22 +2154,22 @@ WHERE {$whereClause}"; switch ($relationField) { case 'country': case 'world_region': - $row[$field . $relationField] = $i18n->crm_translate($fieldValue, array('context' => 'country')); + $row[$relPrefix] = $i18n->crm_translate($fieldValue, array('context' => 'country')); break; case 'state_province': - $row[$field . $relationField] = $i18n->crm_translate($fieldValue, array('context' => 'province')); + $row[$relPrefix] = $i18n->crm_translate($fieldValue, array('context' => 'province')); break; default: - $row[$field . $relationField] = $fieldValue; + $row[$relPrefix] = $fieldValue; break; } } } else { // if relation field is empty or null - $row[$field . $relationField] = ''; + $row[$relPrefix] = ''; } } } -- 2.25.1