From a1a68e64c31790f480cc3f9bac5e9a30d42c4daf Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Tue, 24 Sep 2013 16:27:04 +0530 Subject: [PATCH] -- CRM-13400, removed obsolete code and fixed default settting of current membership ---------------------------------------- * CRM-13400: Online membership renewal via contribution page no longer sets existing membership as default http://issues.civicrm.org/jira/browse/CRM-13400 --- CRM/Contribute/Form/Contribution/Main.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 1619ca86af..358a90de47 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -216,11 +216,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu } } - //set default membership for membershipship block - if ($this->_membershipBlock) { - $this->_defaults['selectMembership'] = $defaultMemType = $this->_defaultMemTypeId ? $this->_defaultMemTypeId : CRM_Utils_Array::value('membership_type_default', $this->_membershipBlock); - } - // // hack to simplify credit card entry for testing // $this->_defaults['credit_card_type'] = 'Visa'; // $this->_defaults['amount'] = 168; @@ -281,7 +276,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu CRM_Core_BAO_Address::fixAllStateSelects($this, $this->_defaults); if ($this->_priceSetId) { - if ($this->_useForMember && !empty($this->_currentMemberships)) { + if (($this->_useForMember && !empty($this->_currentMemberships)) || $this->_defaultMemTypeId) { $selectedCurrentMemTypes = array(); foreach ($this->_priceSet['fields'] as $key => $val) { foreach ($val['options'] as $keys => $values) { -- 2.25.1