Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: civicrm/civicrm-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 01040718a30f1b22ca5a8a8e6f21ab94dfbbca99
Choose a base ref
..
head repository: civicrm/civicrm-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a64d61277545d035e7f41e99df9d9bd23c8dd0d9
Choose a head ref
Showing with 3 additions and 1 deletion.
  1. +3 −1 CRM/Contribute/BAO/Contribution.php
4 changes: 3 additions & 1 deletion CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
@@ -2649,7 +2649,7 @@ protected static function repeatTransaction(&$contribution, $input, $contributio
$contributionParams['financial_type_id'] = $templateContribution['financial_type_id'];
}
foreach (['contact_id', 'currency', 'source', 'amount_level', 'address_id'] as $fieldName) {
if (isset($templateContribution[$fieldName])){
if (isset($templateContribution[$fieldName])) {
$contributionParams[$fieldName] = $templateContribution[$fieldName];
}
}
@@ -2658,6 +2658,8 @@ protected static function repeatTransaction(&$contribution, $input, $contributio
$contributionParams['campaign_id'] = $recurringContribution['campaign_id'];
}
if (!isset($contributionParams['campaign_id']) && isset($templateContribution['campaign_id'])) {
// Fall back on value from the previous contribution if not passed in as input
// or loadable from the recurring contribution.
$contributionParams['campaign_id'] = $templateContribution['campaign_id'];
}
$contributionParams['source'] = $contributionParams['source'] ?: ts('Recurring contribution');