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 single use of extraParams in CRM_Utils_Token::getTokenDetails() #19640

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

mattwire
Copy link
Contributor

Overview

I wanted to switch CRM_Utils_Token::getTokenDetails() to API4 but the existence of $extraParams makes this difficult. Turns out it's only used in one place and can easily be removed.

Before

$extraParams may be passed to tokens query.

After

$extraParams not used.

Technical Details

Calling getTokenDetails with [0] makes no sense because nothing is returned.

Comments

@eileenmcnaughton I started looking at some of the differences in contact token parsing and thought that both old/new functions would be simplified a lot if we switched them to API4.

@civibot
Copy link

civibot bot commented Feb 21, 2021

(Standard links)

@civibot civibot bot added the master label Feb 21, 2021
@eileenmcnaughton
Copy link
Contributor

@mattwire I agree that the extraparams is only passed from one place and that it is meaningless as it simply further-filters the $params used for contact retrieval - which should not be necesssary as ids is passed in. This is a helpful simplification

I had been looking at how to move the other function to apiv4 - although I wanted to see if people agree about removing some tokens first (hash, the fields that return the template for the greetings)

@eileenmcnaughton eileenmcnaughton merged commit 340ad7b into civicrm:master Feb 21, 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