From: eileen Date: Thu, 7 Mar 2019 13:28:11 +0000 (+1300) Subject: [REF] minor code simplification X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a4859929943b5ad405a43bb46dfd98b3288d8b54;p=civicrm-core.git [REF] minor code simplification This just removes the duplicate assign codes & simplifies the /bin/bash condition --- 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',