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

NFC - Deprecate duplicate function #12602

Merged
merged 2 commits into from
Jul 31, 2018

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jul 30, 2018

Summary

As @eileenmcnaughton noted in civicrm/org.civicrm.module.cividiscount#173, there are 2 basically identical functions. This PR deprecates one of them.

Technical Details

Grepping around, both functions are used equally often, but according to the git history, the one in CRM_Core_DAO is much older. I was tempted to favor that one because of its grandfatherly status, but I think CRM_Core_BAO_SchemaHandler is a better location, so I'm favoring that one to reduce bloat in CRM_Core_DAO.

The one in CRM_Core_DAO had an additional param so I copied it over to the favored function.

I've also pushed up stricter validation; switching from "String" which performs no validation to "Alphanumeric" which checks against the only sensible characters a table column ought to contain.

@civibot
Copy link

civibot bot commented Jul 30, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor

jenkins you got this

@colemanw
Copy link
Member Author

@civicrm-builder retest this please

@eileenmcnaughton eileenmcnaughton merged commit f200e98 into civicrm:master Jul 31, 2018
@eileenmcnaughton eileenmcnaughton deleted the checkIfFieldExists branch July 31, 2018 21:56
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