From: yashodha Date: Wed, 31 Jul 2013 06:16:45 +0000 (+0530) Subject: CRM-13092 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=040898feea5a6890405d167f743b681a400512f3;p=civicrm-core.git CRM-13092 --- 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 = '';