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

[minor cleanup] reduce params passed to searchQuery #13715

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor cleanup

Before

less readable

After

more readable

Technical Details

Where we are retrieving the sql we can call the inner function rather than passing 'true'
in other cases we are passing default values through

in general passing lots of variables to searchQuery in order to tweak the results is a bad code smell - ideally we could have some more specific functions to call - getCount, getAlphabetQuery and with the ones which do weird stuff we'd call an extracted function that gets an array - so we don't get a sql query & then str_replace out the select clause & parts we don't want

Comments

Where we are retrieving the sql we can call the inner function rather than passing 'true'
in other cases we are passing default values through
@civibot
Copy link

civibot bot commented Feb 27, 2019

(Standard links)

@civibot civibot bot added the master label Feb 27, 2019
@eileenmcnaughton
Copy link
Contributor Author

@monishdeb are you able to merge this - trivial cleanup & the one line that is not in a test class has heavy test coverage

@monishdeb
Copy link
Member

Patch reviewed and existing UTs passed too. Merging now

@monishdeb monishdeb merged commit f588781 into civicrm:master Feb 27, 2019
@seamuslee001 seamuslee001 deleted the order_fix branch February 27, 2019 09:16
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