X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMailingGroup.php;h=c042a393cf9b19100f8966c34b7b1c1583974998;hb=6238501eb59e8f3f540c6feef0315a4beacc95f4;hp=0c9f4ddc42c5037909c6ca15678c3a9c34efde4e;hpb=6a4880350680e1e4d20e5c8a622a791f926ca750;p=civicrm-core.git diff --git a/api/v3/MailingGroup.php b/api/v3/MailingGroup.php index 0c9f4ddc42..c042a393cf 100644 --- a/api/v3/MailingGroup.php +++ b/api/v3/MailingGroup.php @@ -1,11 +1,10 @@ fields(); $d->free(); $dao = _civicrm_api3_get_DAO('Unsubscribe'); - $file = str_replace('_', '/', $dao) . ".php"; - require_once ($file); $d = new $dao(); $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); }