From 040898feea5a6890405d167f743b681a400512f3 Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 31 Jul 2013 11:46:45 +0530 Subject: [PATCH] CRM-13092 --- CRM/Export/BAO/Export.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 55e50b7c2e..f63e2d8648 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -483,15 +483,17 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c $component = 'civicrm_pledge'; break; - case CRM_Export_Form_Select::CASE_EXPORT: - $component = 'civicrm_case'; - break; - case CRM_Export_Form_Select::GRANT_EXPORT: $component = 'civicrm_grant'; break; } - $relIDs = CRM_Core_DAO::getContactIDsFromComponent($ids, $component); + + if ($exportMode == CRM_Export_Form_Select::CASE_EXPORT) { + $relIDs = CRM_Case_BAO_Case::retrieveContactIdsByCaseId($ids); + } + else { + $relIDs = CRM_Core_DAO::getContactIDsFromComponent($ids, $component); + } } $relationshipJoin = $relationshipClause = ''; -- 2.25.1