Skip to content

Commit

Permalink
[REF] Remove now non-variable variables from previously shared code
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Dec 20, 2021
1 parent eedf2b1 commit 8ec883b
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions CRM/Contribute/Form/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -1119,10 +1119,8 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) {

$contribution = $this->processFormContribution(
$this->_params,
NULL,
$contributionParams,
$financialType,
FALSE,
$this->_bltID,
CRM_Utils_Array::value('is_recur', $this->_params)
);
Expand Down Expand Up @@ -1203,7 +1201,6 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) {
* end form - not all aspects of the code will be relevant to this form.
*
* @param array $params
* @param array $result
* @param array $contributionParams
* Parameters to be passed to contribution create action.
* This differs from params in that we are currently adding params to it and 1) ensuring they are being
Expand All @@ -1218,9 +1215,6 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) {
* - thankyou_date (not all forms will set this)
*
* @param CRM_Financial_DAO_FinancialType $financialType
* @param bool $online
* Is the form a front end form? If so set a bunch of unpredictable things that should be passed in from the form.
*
* @param int $billingLocationID
* ID of billing location type.
* @param bool $isRecur
Expand All @@ -1230,13 +1224,14 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) {
*
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
* @todo - this form is a copy of the previously shared code on the front
* end form - not all aspects of the code will be relevant to this form.
*
*/
protected function processFormContribution(
$params,
$result,
$contributionParams,
$financialType,
$online,
$billingLocationID,
$isRecur
) {
Expand Down Expand Up @@ -1282,7 +1277,7 @@ protected function processFormContribution(
if (isset($params['amount'])) {
$contributionParams = array_merge(CRM_Contribute_Form_Contribution_Confirm::getContributionParams(
$params, $financialType->id,
$result, $receiptDate,
NULL, $receiptDate,
$recurringContributionID), $contributionParams
);
$contributionParams['non_deductible_amount'] = CRM_Contribute_Form_Contribution_Confirm::getNonDeductibleAmount($params, $financialType, $online, $form);
Expand Down Expand Up @@ -1328,14 +1323,7 @@ protected function processFormContribution(
$form = CRM_Contribute_Form_Contribution_Confirm::handlePledge($form, $params, $contributionParams, $pledgeID, $contribution, $isEmailReceipt);
}

if ($online && $contribution) {
CRM_Core_BAO_CustomValueTable::postProcess($params,
'civicrm_contribution',
$contribution->id,
'Contribution'
);
}
elseif ($contribution) {
if ($contribution) {
//handle custom data.
$params['contribution_id'] = $contribution->id;
if (!empty($params['custom']) &&
Expand Down

0 comments on commit 8ec883b

Please sign in to comment.