From 88e4ed6741bfcaa96e05368483e7eb3da2488f29 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 22 Sep 2023 15:16:56 +1200 Subject: [PATCH] dev/core#4619 Remove removable instances of contribute Mode --- CRM/Contribute/Form/Contribution/Confirm.php | 9 --------- CRM/Event/BAO/Event.php | 4 ---- CRM/Event/Form/Registration/Confirm.php | 1 - CRM/Financial/BAO/Payment.php | 1 - templates/CRM/Event/Form/Registration/ThankYou.tpl | 2 +- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index e43d107f1c..40465f44c1 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -1594,15 +1594,6 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr $pending = $membershipContribution->contribution_status_id == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Pending'); } else { - // The concept of contributeMode is deprecated. - // the is_monetary concept probably should be too as it can be calculated from - // the existence of 'amount' & seems fragile. - if (((isset($this->_contributeMode)) || !empty($this->_params['is_pay_later']) - ) && - (($this->_values['is_monetary'] && $this->_amount > 0.0)) - ) { - $pending = TRUE; - } $pending = FALSE; } diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 9b905aebfc..4fcbb99cef 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1161,8 +1161,6 @@ WHERE civicrm_event.is_active = 1 'email' => $notifyEmail, 'confirm_email_text' => $values['event']['confirm_email_text'] ?? NULL, 'isShowLocation' => $values['event']['is_show_location'] ?? NULL, - // The concept of contributeMode is deprecated. - 'contributeMode' => $template->_tpl_vars['contributeMode'] ?? NULL, 'customPre' => $profilePre[0], 'customPre_grouptitle' => empty($profilePre[1]) ? NULL : [CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $preProfileID)], 'customPost' => $profilePost[0], @@ -1203,8 +1201,6 @@ WHERE civicrm_event.is_active = 1 $displayAddress = $values['address'] ?? NULL; if ($displayAddress) { $sendTemplateParams['tplParams']['address'] = $displayAddress; - // The concept of contributeMode is deprecated. - $sendTemplateParams['tplParams']['contributeMode'] = NULL; } // set lineItem details diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 30161be569..f176696f63 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -1307,7 +1307,6 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $form->_values['custom_pre_id'] = $params['custom_pre_id'] ?? NULL; $form->_values['custom_post_id'] = $params['custom_post_id'] ?? NULL; $form->_values['event'] = $params['event'] ?? NULL; - $form->_contributeMode = $params['contributeMode']; $eventParams = ['id' => $params['id']]; CRM_Event_BAO_Event::retrieve($eventParams, $form->_values['event']); $form->set('registerByID', $params['registerByID']); diff --git a/CRM/Financial/BAO/Payment.php b/CRM/Financial/BAO/Payment.php index b9643f8243..0f8cffbc51 100644 --- a/CRM/Financial/BAO/Payment.php +++ b/CRM/Financial/BAO/Payment.php @@ -463,7 +463,6 @@ class CRM_Financial_BAO_Payment { // and assign. Note we should update the tpl to use {if $billingName} // and ditch contributeMode - although it might need to be deprecated rather than removed. $todoParams = [ - 'contributeMode', 'billingName', 'address', 'credit_card_type', diff --git a/templates/CRM/Event/Form/Registration/ThankYou.tpl b/templates/CRM/Event/Form/Registration/ThankYou.tpl index 8bfee5d1eb..fc371dc5be 100644 --- a/templates/CRM/Event/Form/Registration/ThankYou.tpl +++ b/templates/CRM/Event/Form/Registration/ThankYou.tpl @@ -115,7 +115,7 @@
{/if} - {if $contributeMode ne 'notify' AND $trxn_id} + {if $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
-- 2.25.1