another break due to PseudoConstant changes
authorkurund <kurund@civicrm.org>
Mon, 12 Aug 2013 21:53:17 +0000 (03:23 +0530)
committerkurund <kurund@civicrm.org>
Mon, 12 Aug 2013 21:53:17 +0000 (03:23 +0530)
CRM/Export/BAO/Export.php

index 99436550e003cc5819f23527eb368839a7f8b5f0..137c6f2e6af5b397243773b07fb353774fe326d9 100644 (file)
@@ -455,7 +455,8 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
           $relIDs = $ids;
         }
         elseif ($exportMode == CRM_Export_Form_Select::ACTIVITY_EXPORT) {
-          $activityContacts = CRM_Core_PseudoConstant::activityContacts('name');
+          $activityContacts = $activityContacts = CRM_Core_OptionGroup::values('activity_contacts',
+            FALSE, FALSE, FALSE, NULL, 'name');
           $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
           $query = "SELECT contact_id FROM civicrm_activity_contact
                               WHERE activity_id IN ( " . implode(',', $ids) . ") AND
@@ -632,8 +633,10 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
         $count++;
         $row = array();
 
-        //convert the pseudo constants
-        $query->convertToPseudoNames($dao);
+        if ($exportMode == CRM_Export_Form_Select::CONTACT_EXPORT) {
+          //convert the pseudo constants
+          $query->convertToPseudoNames($dao);
+        }
 
         //first loop through returnproperties so that we return what is required, and in same order.
         $relationshipField = 0;
@@ -1797,7 +1800,7 @@ LIMIT $offset, $limit
    * Function to manipulate header rows for relationship fields
    *
    */
-  function manipulateHeaderRows(&$headerRows, $contactRelationshipTypes) {
+  public static function manipulateHeaderRows(&$headerRows, $contactRelationshipTypes) {
     foreach ($headerRows as & $header) {
       $split = explode('-', $header);
       if ($relationTypeName = CRM_Utils_Array::value($split[0], $contactRelationshipTypes)) {