From: Mathieu Lutfy Date: Mon, 21 Mar 2016 20:08:33 +0000 (-0400) Subject: CRM-17862: Source field - in backend - one-time credit card contribution defaults... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7b9947fbfed72e08a9e7ae1a06518b6e34a17c1a;p=civicrm-core.git CRM-17862: Source field - in backend - one-time credit card contribution defaults to 'recurring contribution'. --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 263963f0b4..7cf379ea14 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4763,7 +4763,10 @@ LIMIT 1;"; * @throws \CiviCRM_API3_Exception */ protected static function getRecurringContributionDescription($contribution, $event) { - if (!empty($contribution->contribution_page_id)) { + if (! empty($contribution->source)) { + return $contribution->source; + } + elseif (!empty($contribution->contribution_page_id)) { $contributionPageTitle = civicrm_api3('ContributionPage', 'getvalue', array( 'id' => $contribution->contribution_page_id, 'return' => 'title',