From 825c0e95258ffb597d67161e79cd57e887c196fb Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 1 Jan 2021 08:42:41 +1300 Subject: [PATCH] Removes default for is_active & is_reserved since they now have DB defaults Is deductible already had a default but it has been fixed so we can rely on it. --- CRM/Financial/BAO/FinancialType.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/CRM/Financial/BAO/FinancialType.php b/CRM/Financial/BAO/FinancialType.php index 427d8bad90..7a31cc66c6 100644 --- a/CRM/Financial/BAO/FinancialType.php +++ b/CRM/Financial/BAO/FinancialType.php @@ -94,21 +94,14 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType { * a deprecation notice. * * @param array $params - * Reference array contains the values submitted by the form. + * Values from the database object. * @param array $ids - * Reference array contains the id. + * Array that we wish to deprecate and remove. * * @return object */ - public static function add(&$params, &$ids = []) { - // @todo deprecate this, move the code to create & call create from add. - if (empty($params['id'])) { - $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); - $params['is_deductible'] = CRM_Utils_Array::value('is_deductible', $params, FALSE); - $params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE); - } - - // action is taken depending upon the mode + public static function add(array $params, $ids = []) { + // @todo deprecate this function, move the code to create & call create from add. $financialType = new CRM_Financial_DAO_FinancialType(); $financialType->copyValues($params); $financialType->save(); -- 2.25.1