From 4aef802d5eb8c8f4fa9be6d87288e746cb5bb7d7 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Mon, 21 Sep 2015 15:38:53 -0400 Subject: [PATCH] Added missing changes from Lisa's review --- CRM/Contribute/Form/Contribution/Confirm.php | 5 ++++ CRM/Price/BAO/PriceSet.php | 6 ++++- extern/tcIPN.php | 25 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 extern/tcIPN.php diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 69856982ea..5ebaf6402d 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -410,6 +410,11 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr $this->_params['is_recur'] = $this->_values['is_recur'] = 1; // check if price set is not quick config if (!empty($this->_params['priceSetId']) && !CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_params['priceSetId'], 'is_quick_config')) { + // Extract the ids for all of the line items that have been + // chosen. + $priceFieldValueIds = array_keys($this->_lineItem[$this->_params['priceSetId']]); + watchdog('foobar', json_encode($priceFieldValueIds)); + list($this->_params['frequency_interval'], $this->_params['frequency_unit']) = CRM_Price_BAO_PriceSet::getRecurDetails($this->_params['priceSetId']); } else { diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 8e9c3dca73..3a3649a33a 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -1312,7 +1312,11 @@ GROUP BY mt.member_of_contact_id"; $dao = CRM_Core_DAO::executeQuery($query, $params); $autoRenewOption = 2; - $interval = $unit = array(); + + $interval = array(); + $unit = array(); + $type = array(); + while ($dao->fetch()) { if (!$dao->auto_renew) { $autoRenewOption = 0; diff --git a/extern/tcIPN.php b/extern/tcIPN.php new file mode 100644 index 0000000000..66b1ef7fe9 --- /dev/null +++ b/extern/tcIPN.php @@ -0,0 +1,25 @@ +main(); +} +exit; -- 2.25.1