From bafd17fb5113ba769d0f89a6240fb85a587e7087 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 25 Nov 2013 14:34:57 -0800 Subject: [PATCH] CRM-13830 - MailingGroup API - hack to disable pseudoconstant lookup --- api/v3/MailingGroup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/v3/MailingGroup.php b/api/v3/MailingGroup.php index a3302e98b3..7bcf9d2aab 100644 --- a/api/v3/MailingGroup.php +++ b/api/v3/MailingGroup.php @@ -51,6 +51,7 @@ function civicrm_api3_mailing_group_event_unsubscribe($params) { /** * Handle a site-level unsubscribe event + * @deprecated * * @param array $params * @@ -96,6 +97,12 @@ function civicrm_api3_mailing_group_getfields($params) { $fields = $fields + $d->fields(); $d->free(); + // CRM-13830 - prevent the api wrapper from helping out with pseudoconstants + // Since these fields don't belong to this entity it will fail + foreach ($fields as &$field) { + unset($field['pseudoconstant']); + } + return civicrm_api3_create_success($fields); } -- 2.25.1