From 4df0677b2445cde4d04e43b0a3af8d8101ecb223 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton <emcnaughton@wikimedia.org> Date: Thu, 19 Aug 2021 11:10:56 +1200 Subject: [PATCH] Remove deprecated function Function has been deprecated noisily for 6 months & was never supported for out of core use --- CRM/Financial/BAO/FinancialType.php | 45 ----------------------------- 1 file changed, 45 deletions(-) diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 0444ba9603..0ddb52138f 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -191,51 +191,6 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { return $financialType; } - /** - * Add permissions for financial types. - * - * @param array $permissions - * @param array $descriptions - * - * @return bool - */ - public static function permissionedFinancialTypes(&$permissions, $descriptions) { - CRM_Core_Error::deprecatedFunctionWarning('not done via hook.'); - if (!self::isACLFinancialTypeStatus()) { - return FALSE; - } - $financialTypes = CRM_Contribute_PseudoConstant::financialType(); - $actions = [ - 'add' => ts('add'), - 'view' => ts('view'), - 'edit' => ts('edit'), - 'delete' => ts('delete'), - ]; - - foreach ($financialTypes as $id => $type) { - foreach ($actions as $action => $action_ts) { - if ($descriptions) { - $permissions[$action . ' contributions of type ' . $type] = [ - ts("CiviCRM: %1 contributions of type %2", [1 => $action_ts, 2 => $type]), - ts('%1 contributions of type %2', [1 => $action_ts, 2 => $type]), - ]; - } - else { - $permissions[$action . ' contributions of type ' . $type] = ts("CiviCRM: %1 contributions of type %2", [1 => $action_ts, 2 => $type]); - } - } - } - if (!$descriptions) { - $permissions['administer CiviCRM Financial Types'] = ts('CiviCRM: administer CiviCRM Financial Types'); - } - else { - $permissions['administer CiviCRM Financial Types'] = [ - ts('CiviCRM: administer CiviCRM Financial Types'), - ts('Administer access to Financial Types'), - ]; - } - } - /** * Wrapper aroung getAvailableFinancialTypes to get all including disabled FinancialTypes * @param int|string $action -- 2.25.1