Merge pull request #12587 from eileenmcnaughton/header_test
authorcolemanw <coleman@civicrm.org>
Wed, 1 Aug 2018 04:25:23 +0000 (00:25 -0400)
committerGitHub <noreply@github.com>
Wed, 1 Aug 2018 04:25:23 +0000 (00:25 -0400)
Export - add tests out header output, move phone_type_id to metadata

1  2 
CRM/Export/BAO/Export.php

index 374f29bb2a827e2db08a00bd5fd590f6ce12ae32,19865c7a800666faff0e664fb3d626afc98e654d..2e3b45acdd303dc694a91ce5b4fb45ae01c0585c
@@@ -1410,14 -1410,12 +1410,11 @@@ WHERE  {$whereClause}"
     *
     * @return array
     */
 -  public static function setHeaderRows($field, $headerRows, $sqlColumns, $processor, $value, $phoneTypes, $imProviders, $relationQuery) {
 +  public static function setHeaderRows($field, $headerRows, $sqlColumns, $processor, $value, $phoneTypes, $imProviders) {
  
      $queryFields = $processor->getQueryFields();
-     // Split campaign into 2 fields for id and title
-     if (substr($field, -14) == 'campaign_title') {
-       $headerRows[] = ts('Campaign Title');
-     }
-     elseif (substr($field, -11) == 'campaign_id') {
+     if (substr($field, -11) == 'campaign_id') {
+       // @todo - set this correctly in the xml rather than here.
        $headerRows[] = ts('Campaign ID');
      }
      elseif (isset($queryFields[$field]['title'])) {