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] [EXPORT] cleanup setting of additional postal fields #14790

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jul 10, 2019

Overview

Minor code cleanup (from #14782)

Before

Less readable

After

More readable, ready for further cleanup

Technical Details

Comments

@civibot
Copy link

civibot bot commented Jul 10, 2019

(Standard links)

@civibot civibot bot added the master label Jul 10, 2019
$fields = ['is_deceased', 'do_not_mail', 'street_address', 'supplemental_address_1'];
foreach ($fields as $index => $field) {
if (!empty($this->getReturnProperties()[$field])) {
unset($field[$index]);
Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton this seems different to the previous code also the previous code seems to ensure that $this->getReturnProperties() gets added if the field is added to that array if we can't find it already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right the array of additionalFieldsForPostalExport is now merged in when we retrieve it

https://github.com/civicrm/civicrm-core/pull/14790/files#diff-ab4b10ab1ddedcbcc3be13fb06348789R347

So we can get it separately for some purpose but also get the full set

@eileenmcnaughton eileenmcnaughton changed the title [REF] cleanup setting of additional postal fields [REF] [EXPORT] cleanup setting of additional postal fields Jul 11, 2019
@eileenmcnaughton
Copy link
Contributor Author

@colemanw @seamuslee001 this has passed now (the big WIP pr still has fails though but not from this commit :-)

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.

3 participants