CRM-16847 - Fix for addressee and greeting related contact export bug
authorJoseph Lacey <joseph@palantetech.coop>
Tue, 14 Jul 2015 18:14:08 +0000 (14:14 -0400)
committerJoseph Lacey <joseph@palantetech.coop>
Tue, 14 Jul 2015 18:14:08 +0000 (14:14 -0400)
----------------------------------------
* CRM-16847: Greeting and Address tokens not properly rendered when exporting related contacts from a contrbution search.
  https://issues.civicrm.org/jira/browse/CRM-16847

CRM/Export/BAO/Export.php

index 9a650476443b405d3d8eb11fcdf9d4d97f918e56..8ba00ee4355a1f90ad4bf205a6e8c47f9f999409 100644 (file)
@@ -914,17 +914,17 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
                 elseif ($relationField == 'provider_id') {
                   $fieldValue = CRM_Utils_Array::value($relationValue, $imProviders);
                 }
-              }
-              // CRM-13995
-              elseif (is_object($relDAO) && in_array($relationField, array(
-                  'email_greeting',
-                  'postal_greeting',
-                  'addressee',
-                ))
-              ) {
-                //special case for greeting replacement
-                $fldValue = "{$relationField}_display";
-                $fieldValue = $relDAO->$fldValue;
+                // CRM-13995
+                elseif (is_object($relDAO) && 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);