-
-
Notifications
You must be signed in to change notification settings - Fork 824
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] Deprecate BAO_Contact::retrieve #22966
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This removes 2 calls to BAO_Contact::retrieve and marks it as deprecated. It is a surprisingly complex function and all the calls to it only use parts of what it does - in general just having the code 'do the thing' is better. In this case it turns out there is no need for the contact objects. There is also some pretty funky handling for the location keys in the next section so making it clearer what is in them should make it possible to simplify that....
(Standard links)
|
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Mar 18, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Mar 18, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
Ok. Refactor is the same before/after just in a different spot. |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Mar 25, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Mar 31, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Apr 1, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
monishdeb
pushed a commit
to JMAConsulting/civicrm-core
that referenced
this pull request
Apr 14, 2022
This builds on civicrm#22966 to improve loading of location entities. It addresses 2 problems 1) the code is really confusing - handling the loading in 2 places 2) not all keys are loaded - resulting in enotices at the tpl layer. Note that address still seems kinda tricky so I haven't worked through that in this PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This removes 2 calls to BAO_Contact::retrieve and marks it as deprecated.
It is a surprisingly complex function and all the calls to it only use parts of what it
does - in general just having the code 'do the thing' is better.
In this case it turns out there is no need for the contact objects. There is
also some pretty funky handling for the location keys in the next section
so making it clearer what is in them should make it possible to simplify that....
Before
BAO_Contact::retrieve called - but with a bunch of pre-work to control the output
After
The functions actually called moved in
Technical Details
I have a follow up that builds on this
Comments