Skip to content

Commit

Permalink
Remove unused variable from previously-shared function
Browse files Browse the repository at this point in the history
radioOptAttrs is set & unuset but never used - this makes sense as the
point of it is to about adding options to a field on the Main
contribution page - which no longer shares this function.
  • Loading branch information
eileenmcnaughton committed May 19, 2023
1 parent 28b4ef7 commit 2493860
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions CRM/Contribute/Form/Contribution/ThankYou.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private function buildMembershipBlock($cid, $selectedMembershipTypeID = NULL, $i
if ($this->_membershipBlock) {
$this->_currentMemberships = [];

$membershipTypeIds = $membershipTypes = $radio = $radioOptAttrs = [];
$membershipTypeIds = $membershipTypes = $radio = [];
$membershipPriceset = (!empty($this->_priceSetId) && $this->_useForMember);

$autoRenewMembershipTypeOptions = [];
Expand Down Expand Up @@ -372,19 +372,15 @@ private function buildMembershipBlock($cid, $selectedMembershipTypeID = NULL, $i
elseif ($memType['is_active']) {

if ($allowAutoRenewOpt) {
$javascriptMethod = ['onclick' => "return showHideAutoRenew( this.value );"];
$isAvailableAutoRenew = $this->_membershipBlock['auto_renew'][$value] ?? 1;
$autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = (int) $memType['auto_renew'] * $isAvailableAutoRenew;
$allowAutoRenewMembership = TRUE;
}
else {
$javascriptMethod = NULL;
$autoRenewMembershipTypeOptions["autoRenewMembershipType_{$value}"] = 0;
}

//add membership type.
$radio[$memType['id']] = NULL;
$radioOptAttrs[$memType['id']] = $javascriptMethod;
if ($cid) {
$membership = new CRM_Member_DAO_Membership();
$membership->contact_id = $cid;
Expand All @@ -404,7 +400,6 @@ private function buildMembershipBlock($cid, $selectedMembershipTypeID = NULL, $i
if ($membership->find(TRUE)) {
if (!$membership->end_date) {
unset($radio[$memType['id']]);
unset($radioOptAttrs[$memType['id']]);
$this->assign('islifetime', TRUE);
continue;
}
Expand Down

0 comments on commit 2493860

Please sign in to comment.