From 3e358ffb8f36c198e84f0a967902da0b2e69cf06 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 22 Sep 2020 16:16:07 +1200 Subject: [PATCH] [REF] Finally remove deprecated ids handling We've been pretty clear for a long time the only supported way to call crud functions is via the api. We noisily deprecated ids about 9 months ago & it has been not-preferred for much longer I only found one place in universe where ids IS passed in https://github.com/lcdservices/biz.lcdservices.movecontrib/edit/master/CRM/LCD/MoveContrib/BAO/MoveContrib.php --- CRM/Contribute/BAO/Contribution.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 4df50cdd4a..0bfe04d5d1 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -445,8 +445,6 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { * * @param array $params * (reference ) an assoc array of name/value pairs. - * @param array $ids - * The array that holds all the db ids. * * @return CRM_Contribute_BAO_Contribution * @@ -454,15 +452,11 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { * @throws \CRM_Core_Exception * @throws \CiviCRM_API3_Exception */ - public static function create(&$params, $ids = []) { + public static function create(&$params) { $transaction = new CRM_Core_Transaction(); try { - if (!isset($params['id']) && isset($ids['contribution'])) { - CRM_Core_Error::deprecatedFunctionWarning('ids should not be used for contribution create'); - $params['id'] = $ids['contribution']; - } $contribution = self::add($params); } catch (CRM_Core_Exception $e) { -- 2.25.1