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

[REF] extract portion that creates the custom field record #14725

Merged
merged 3 commits into from
Jul 5, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Code extraction

Before

Less readable

After

More readable

Technical Details

Note this incorporates #14705 & extends it (which in turn is a superset of #14724 - this allows a reviewer to choose the size of 'chunk' to review)

Comments

Towards #14694

@civibot
Copy link

civibot bot commented Jul 3, 2019

(Standard links)

@pradpnayak
Copy link
Contributor

This need rebasing as well

@eileenmcnaughton
Copy link
Contributor Author

thanks - this is now rebased


$triggerRebuild = CRM_Utils_Array::value('triggerRebuild', $params, TRUE);
//create/drop the index when we toggle the is_searchable flag
$customField = self::createCustomFieldRecord($params);
$op = empty($params['id']) ? 'add' : 'modify';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually @pradpnayak the net effect here is to set the op AFTER the pre hook has been called. I'm now on the fence about that - I guess it's a good thing to set afterwards even though other BAO don't but are also kinda inconsistent.

@colemanw
Copy link
Member

colemanw commented Jul 4, 2019

I don't have a strong opinion on that. I think this is better in than out so adding MOP.

@eileenmcnaughton eileenmcnaughton merged commit 6c58c9a into civicrm:master Jul 5, 2019
@eileenmcnaughton eileenmcnaughton deleted the cust_field4 branch July 5, 2019 00:04
@eileenmcnaughton
Copy link
Contributor Author

merged per mop

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.

3 participants