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

CRM-20995 - API - Extension get - Filter by full_name #10796

Merged
merged 4 commits into from
Aug 1, 2017

Conversation

tschuettler
Copy link
Contributor


Overview

This PR allows to filter Extensions by full_name as generated by API explorer.

Before

crm-20995-before

After

crm-20995-after

Technical Details

It seems a bit confusing to have full_name, key, and keys all refering to the same DAO field full_name.
This PR merges the two parameters full_name and keys to the already used one named keys.

Comments

Almost all parameter and return fields seem to be currently ignored.

----------------------------------------
* CRM-20995: API - Extension get - Ignores parameter full_name as created by API explorer
  https://issues.civicrm.org/jira/browse/CRM-20995
@totten
Copy link
Member

totten commented Jul 31, 2017

I haven't had a chance to try this, but kudos on general form -- unit-test, before/after, and so on. :)

function _civicrm_api3_getKeys($params) {
if (is_array($params['keys'])) {
return $params['keys'];
function _civicrm_api3_getKeys($params, $key) {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest giving the default value 'keys' to the 2nd param in this function signature, to better guerantee backward compatibility. Then you won't have to change the function call everywhere and as a side benefit this PR will be smaller/simpler.

@colemanw colemanw merged commit c19c65e into civicrm:master Aug 1, 2017
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.

4 participants