From 6626a6934b57f2cab5b9813efb5599f700dda18c Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 Mar 2017 11:48:29 +1300 Subject: [PATCH] CRM-20247 further removal of ignored is_recur parameter. This variable was part of a legacy flow via the BaseIPN. Removing the variable is a good tidy up step --- CRM/Contribute/BAO/Contribution.php | 4 +--- CRM/Contribute/Form/Task/PDF.php | 2 +- CRM/Core/Payment/BaseIPN.php | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index a7a2537acb..2d2434d273 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2416,7 +2416,6 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac * @param array $values * Any values that may have already been compiled by calling process. * This is augmented by values 'gathered' by gatherMessageValues - * @param bool $recur * @param bool $returnMessageText * Distinguishes between whether to send message or return. * message text. We are working towards this function ALWAYS returning message text & calling @@ -4705,9 +4704,8 @@ LIMIT 1;"; * @throws \CRM_Core_Exception * @throws \CiviCRM_API3_Exception */ - public static function sendMail(&$input, &$ids, $contributionID, &$values, $recur = FALSE, + public static function sendMail(&$input, &$ids, $contributionID, &$values, $returnMessageText = FALSE) { - $input['is_recur'] = $recur; $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->id = $contributionID; diff --git a/CRM/Contribute/Form/Task/PDF.php b/CRM/Contribute/Form/Task/PDF.php index 508460c8b2..2455d38fde 100644 --- a/CRM/Contribute/Form/Task/PDF.php +++ b/CRM/Contribute/Form/Task/PDF.php @@ -206,7 +206,7 @@ AND {$this->_componentClause}"; $input['receipt_from_name'] = str_replace('"', '', $fromDetails[0]); } - $mail = CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $objects['contribution']->id, $values, FALSE, + $mail = CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $objects['contribution']->id, $values, $elements['createPdf']); if ($mail['html']) { diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index 4a3d25f677..d1bbb00cba 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -471,10 +471,10 @@ class CRM_Core_Payment_BaseIPN { } /** - * Send receipt from contribution. - * * @deprecated * + * @todo confirm this function is not being used by any payment processor outside core & remove. + * * Note that the compose message part has been moved to contribution * In general LoadObjects is called first to get the objects but the composeMessageArray function now calls it * @@ -494,7 +494,7 @@ class CRM_Core_Payment_BaseIPN { * @return array */ public function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) { - return CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $objects['contribution']->id, $values, $recur, + return CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $objects['contribution']->id, $values, $returnMessageText); } -- 2.25.1