projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3682 from monishdeb/CRM-14969
[civicrm-core.git]
/
api
/
v3
/
MailingGroup.php
diff --git
a/api/v3/MailingGroup.php
b/api/v3/MailingGroup.php
index 3f7a6ada837eb3fb7c450ab36a7ae52788ce5adf..c042a393cf9b19100f8966c34b7b1c1583974998 100644
(file)
--- a/
api/v3/MailingGroup.php
+++ b/
api/v3/MailingGroup.php
@@
-2,9
+2,9
@@
/*
+--------------------------------------------------------------------+
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
3
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-32,7
+32,7
@@
*
* @package CiviCRM_APIv3
* @subpackage API_MailerGroup
*
* @package CiviCRM_APIv3
* @subpackage API_MailerGroup
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-51,6
+51,7
@@
function civicrm_api3_mailing_group_event_unsubscribe($params) {
/**
* Handle a site-level unsubscribe event
/**
* Handle a site-level unsubscribe event
+ * @deprecated
*
* @param array $params
*
*
* @param array $params
*
@@
-85,6
+86,11
@@
function civicrm_api3_mailing_group_event_subscribe($params) {
return civicrm_api('mailing_event_subscribe', 'create', $params);
}
return civicrm_api('mailing_event_subscribe', 'create', $params);
}
+/**
+ * @param $params
+ *
+ * @return array
+ */
function civicrm_api3_mailing_group_getfields($params) {
$dao = _civicrm_api3_get_DAO('Subscribe');
$d = new $dao();
function civicrm_api3_mailing_group_getfields($params) {
$dao = _civicrm_api3_get_DAO('Subscribe');
$d = new $dao();
@@
-96,6
+102,12
@@
function civicrm_api3_mailing_group_getfields($params) {
$fields = $fields + $d->fields();
$d->free();
$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);
}
return civicrm_api3_create_success($fields);
}