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

Fix caching on campaign pseudoconstant #21083

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fix caching on campaign pseudoconstant

Before

static

After

Civi::statics

Technical Details

tests like it better - pulled out of the token PRs

Comments

@civibot
Copy link

civibot bot commented Aug 10, 2021

(Standard links)

@civibot civibot bot added the master label Aug 10, 2021
@colemanw
Copy link
Member

@eileenmcnaughton checkstyle failed, and not just because of the poor grammar in "isCampaignEnable"

@eileenmcnaughton
Copy link
Contributor Author

@colemanw you can't mess with history

image

@eileenmcnaughton
Copy link
Contributor Author

@colemanw passed now

@colemanw
Copy link
Member

Sorry @eileenmcnaughton I just read this code and actually paid attention, and now it occurs to me to ask: "what could possibly be the benefit of caching the results of in_array()?" I can think of none. I think this whole function should be reduced to 1 line.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw I think you're right!

@colemanw colemanw merged commit 92bce1b into civicrm:master Aug 11, 2021
@colemanw colemanw deleted the camp_pseudo branch August 11, 2021 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants