From fe8053a4147c4f86756f4935f1ed347038b7a023 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Mon, 14 Jan 2019 23:20:56 -0500 Subject: [PATCH] fix bug on new contributions submitted from non-logged in user --- batchexportperm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/batchexportperm.php b/batchexportperm.php index 4d13d0a..79a41c3 100644 --- a/batchexportperm.php +++ b/batchexportperm.php @@ -286,10 +286,12 @@ function _batchexportperm_civicrm_allow_contribution_to_edit($contributionId) { 'custom_group_id' => "batchexportperm_batch_details", 'name' => "export_date", ]); - $exportDate = civicrm_api3('Contribution', 'getvalue', [ + $exportDate = civicrm_api3('Contribution', 'get', [ 'return' => "custom_{$customFieldId}", 'id' => $contributionId, - ]); + 'sequential' => 1, + ])['values'][0]["custom_{$customFieldId}"]; + CRM_Core_Error::debug('exportdate', $exportDate); if (empty($exportDate) || CRM_Core_Permission::check('edit exported contributions')) { return TRUE; }