From: Monish Deb Date: Sat, 16 Feb 2019 07:32:52 +0000 (+0530) Subject: Merge pull request #13563 from eileenmcnaughton/fn_fix_payment_by_type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4cd3a8e8e07b335e587b5baee9824bcc630ffcd5;p=civicrm-core.git Merge pull request #13563 from eileenmcnaughton/fn_fix_payment_by_type [REF] Fix silly function to do less handling of non-existent scenarios --- 4cd3a8e8e07b335e587b5baee9824bcc630ffcd5 diff --cc CRM/Contribute/BAO/Contribution.php index dc7a4f208f,ff359e3ba3..8f61766b39 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@@ -4000,11 -4000,8 +4000,9 @@@ WHERE eft.financial_trxn_id IN ({$trxnI * * @return mixed */ - public static function getPaymentInfo($id, $component, $getTrxnInfo = FALSE, $usingLineTotal = FALSE) { + public static function getPaymentInfo($id, $component = 'contribution', $getTrxnInfo = FALSE, $usingLineTotal = FALSE) { + // @todo deprecate passing in component - always call with contribution. if ($component == 'event') { - $entity = 'participant'; - $entityTable = 'civicrm_participant'; $contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $id, 'contribution_id', 'participant_id'); if (!$contributionId) {