From: kurund Date: Wed, 13 May 2015 10:31:56 +0000 (+0530) Subject: Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-05-13-15-51-23 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a14e123a77a33879f3dd63c74b0c72031e0c8b5f;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-05-13-15-51-23 Conflicts: sql/civicrm_generated.mysql tests/phpunit/api/v3/SyntaxConformanceTest.php --- a14e123a77a33879f3dd63c74b0c72031e0c8b5f diff --cc CRM/Contribute/BAO/Contribution/Utils.php index 6756c3cb52,b3449beac1..202d22066d --- a/CRM/Contribute/BAO/Contribution/Utils.php +++ b/CRM/Contribute/BAO/Contribution/Utils.php @@@ -226,23 -225,28 +226,29 @@@ class CRM_Contribute_BAO_Contribution_U // (i.e., the amount NOT associated with the membership). Temporarily // cache the is_recur values so we can process the additional gift as a // one-off payment. + $pending = FALSE; if ($form->_membershipBlock['is_separate_payment']) { - $cachedFormValue = CRM_Utils_Array::value('is_recur', $form->_values); - unset($form->_values['is_recur']); - $cachedParamValue = CRM_Utils_Array::value('is_recur', $paymentParams); - unset($paymentParams['is_recur']); + if (!empty($form->_params['auto_renew'])) { + $cachedFormValue = CRM_Utils_Array::value('is_recur', $form->_values); + $cachedParamValue = CRM_Utils_Array::value('is_recur', $paymentParams); + unset($form->_values['is_recur']); + unset($paymentParams['is_recur']); + } + else { + $pending = TRUE; + } } - $contribution = CRM_Contribute_Form_Contribution_Confirm::processContribution( + $contribution = CRM_Contribute_Form_Contribution_Confirm::processFormContribution( $form, $paymentParams, NULL, $contactID, $contributionType, - TRUE, TRUE, + $pending, TRUE, $isTest, - $lineItems + $lineItems, + $form->_bltID ); // restore cached values (part of fix for CRM-14354)