From ac67131d9ba414b4eb91c03c3ce39ded51447fe9 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 12 Aug 2013 15:24:11 -0700 Subject: [PATCH] Add pseudoconstant to activityAssignment xml --- CRM/Export/BAO/Export.php | 4 +--- xml/schema/Activity/ActivityContact.xml | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 137c6f2e6a..54777f4830 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -455,9 +455,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c $relIDs = $ids; } elseif ($exportMode == CRM_Export_Form_Select::ACTIVITY_EXPORT) { - $activityContacts = $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', - FALSE, FALSE, FALSE, NULL, 'name'); - $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts); + $sourceID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_ActivityAssignment', 'record_type_id', 'Activity Source'); $query = "SELECT contact_id FROM civicrm_activity_contact WHERE activity_id IN ( " . implode(',', $ids) . ") AND record_type_id = {$sourceID}"; diff --git a/xml/schema/Activity/ActivityContact.xml b/xml/schema/Activity/ActivityContact.xml index 3f5138b694..1cb6a72885 100644 --- a/xml/schema/Activity/ActivityContact.xml +++ b/xml/schema/Activity/ActivityContact.xml @@ -55,6 +55,9 @@ int unsigned Record Type ID The record type id for this row + + activity_contacts + 4.4 -- 2.25.1