From 8715ff9933b4d60a546c7bc59d59d9fd1b54ee96 Mon Sep 17 00:00:00 2001 From: Edsel Date: Mon, 8 Feb 2016 18:31:08 +0530 Subject: [PATCH] CRM-16526 CIVI-3 Bug fix for permission for API ---------------------------------------- * CRM-16526: ACLs for Financial Types https://issues.civicrm.org/jira/browse/CRM-16526 --- api/v3/Contribution.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index 1ac600a5b6..6ab0c195e8 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -48,7 +48,7 @@ function civicrm_api3_contribution_create(&$params) { if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { if (empty($params['id'])) { - $op = 'add'; + $op = CRM_Core_Action::ADD; } else { if (empty($params['financial_type_id'])) { @@ -57,7 +57,7 @@ function civicrm_api3_contribution_create(&$params) { 'return' => 'financial_type_id', )); } - $op = 'edit'; + $op = CRM_Core_Action::UPDATE; } CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types, $op); if (!in_array($params['financial_type_id'], array_keys($types))) { -- 2.25.1