Skip to content

Commit

Permalink
Check CiviCRM version in export hook veda-consulting-company#157
Browse files Browse the repository at this point in the history
  • Loading branch information
scardinius committed Dec 20, 2018
1 parent 26172f5 commit cc20f5d
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions gdpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,18 +355,20 @@ function gdpr_civicrm_tabset($tabsetName, &$tabs, $context) {
* Implements hook_civicrm_export().
*/
function gdpr_civicrm_export($exportTempTable, $headerRows, $sqlColumns, $exportMode, $componentTable, $ids) {
switch ($exportMode) {
case CRM_Export_Form_Select::CONTACT_EXPORT:
CRM_Gdpr_Export::contact($componentTable);
break;

case CRM_Export_Form_Select::ACTIVITY_EXPORT:
CRM_Gdpr_Export::activity($ids);
break;

case CRM_Export_Form_Select::CONTRIBUTE_EXPORT:
CRM_Gdpr_Export::contribution($ids);
break;
if (version_compare(CRM_Utils_System::version(), '5.8.0', '>=')) {
switch ($exportMode) {
case CRM_Export_Form_Select::CONTACT_EXPORT:
CRM_Gdpr_Export::contact($componentTable);
break;

case CRM_Export_Form_Select::ACTIVITY_EXPORT:
CRM_Gdpr_Export::activity($ids);
break;

case CRM_Export_Form_Select::CONTRIBUTE_EXPORT:
CRM_Gdpr_Export::contribution($ids);
break;
}
}
}

Expand Down

0 comments on commit cc20f5d

Please sign in to comment.