From 77d80c9fe9128858755fce14111dd73bd2aff597 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 13 Oct 2014 15:17:53 -0400 Subject: [PATCH] CRM-15417 - fix getfields output --- api/v3/MailingGroup.php | 2 +- templates/CRM/Admin/Page/APIExplorer.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/v3/MailingGroup.php b/api/v3/MailingGroup.php index 490a793649..a75b5323b3 100644 --- a/api/v3/MailingGroup.php +++ b/api/v3/MailingGroup.php @@ -116,6 +116,6 @@ function civicrm_api3_mailing_group_getfields($params) { unset($field['pseudoconstant']); } - return civicrm_api3_create_success($fields, $params, 'mailing_group'); + return civicrm_api3_create_success($fields, $params, 'mailing_group', 'getfields'); } diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index d76826a7ed..4455c960e0 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -87,7 +87,10 @@ id: 'api_action', text: 'Action' }); - options.api_action = _.transform(actions, function(ret, item) {ret.push({value: item, key: item})}); + options.api_action = _.reduce(actions.values, function(ret, item) { + ret[item] = item; + return ret; + }, {}); showFields(['api_action']); return; } -- 2.25.1