CRM-19472 - Export headers for relationships are in machine name format
authorEllen Hendricks <ellen.hendricks@sprydigital.com>
Fri, 7 Oct 2016 23:09:55 +0000 (18:09 -0500)
committerEllen Hendricks <ellen.hendricks@sprydigital.com>
Fri, 7 Oct 2016 23:09:55 +0000 (18:09 -0500)
----------------------------------------
* CRM-19472: Export headers for relationships are in "machine name" format
  https://issues.civicrm.org/jira/browse/CRM-19472

CRM/Export/BAO/Export.php

index 85e660f3e20894d6162c6df90a658f5325f2d0d7..5b1d2b686fc55c1ec0867caa0587497a73cbb4f4 100644 (file)
@@ -2052,7 +2052,6 @@ WHERE  {$whereClause}";
       }
     }
     elseif (array_key_exists($field, $contactRelationshipTypes)) {
-      self::manipulateHeaderRows($headerRows, $contactRelationshipTypes);
       foreach ($value as $relationField => $relationValue) {
         // below block is same as primary block (duplicate)
         if (isset($relationQuery[$field]->_fields[$relationField]['title'])) {
@@ -2118,6 +2117,8 @@ WHERE  {$whereClause}";
       $headerRows[] = $field;
     }
 
+    self::manipulateHeaderRows($headerRows, $contactRelationshipTypes);
+
     self::sqlColumnDefn($query, $sqlColumns, $field);
 
     return array($headerRows, $sqlColumns);