From: Edsel Date: Mon, 8 Feb 2016 13:01:08 +0000 (+0530) Subject: CRM-16526 CIVI-3 Bug fix for permission for API X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8715ff9933b4d60a546c7bc59d59d9fd1b54ee96;p=civicrm-core.git CRM-16526 CIVI-3 Bug fix for permission for API ---------------------------------------- * CRM-16526: ACLs for Financial Types https://issues.civicrm.org/jira/browse/CRM-16526 --- 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))) {