Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variables/assigns from buildMembershipBlock function #19775

Merged

Conversation

mattwire
Copy link
Contributor

Overview

Further simplification of the buildMembershipBlock() function that was moved from contributionBase.

This removes an unused assign and variables from the Confirm and ThankYou pages.

Before

Unused variable assigned

After

Unused variable not assigned or created.

Technical Details

allowAutoRenewMembership is used in Main.tpl and MembershipBlock.tpl. Only MembershipBlock.tpl is included from Confirm.tpl and ThankYou.tpl.
If you look here https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl#L274 you can see that allowAutoRenewMembership is used in an if statement that makes no sense for Confirm/ThankYou pages because it's setting the status of a checkbox that doesn't exist.

Comments

@civibot
Copy link

civibot bot commented Mar 10, 2021

(Standard links)

@civibot civibot bot added the master label Mar 10, 2021
@eileenmcnaughton
Copy link
Contributor

OK - I agree with the case you are making here

@eileenmcnaughton eileenmcnaughton merged commit 5fc7ef1 into civicrm:master Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants