From a4859929943b5ad405a43bb46dfd98b3288d8b54 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 8 Mar 2019 02:28:11 +1300 Subject: [PATCH] [REF] minor code simplification This just removes the duplicate assign codes & simplifies the /bin/bash condition --- CRM/Contribute/Form/Contribution/Confirm.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 14b5efbe79..cf36444767 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -596,20 +596,17 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr // the is_monetary concept probably should be too as it can be calculated from // the existence of 'amount' & seems fragile. if ($this->_contributeMode == 'notify' || - $this->_amount < 0.0 || $this->_params['is_pay_later'] || - ($this->_separateMembershipPayment && $this->_amount <= 0.0) + $this->_amount <= 0.0 || $this->_params['is_pay_later'] ) { $contribButton = ts('Continue'); - $this->assign('button', ts('Continue')); } elseif (!empty($this->_ccid)) { $contribButton = ts('Make Payment'); - $this->assign('button', ts('Make Payment')); } else { $contribButton = ts('Make Contribution'); - $this->assign('button', ts('Make Contribution')); } + $this->assign('button', $contribButton); $this->addButtons(array( array( 'type' => 'next', -- 2.25.1