Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-03-20-15-52-17
[civicrm-core.git] / api / v3 / MailingGroup.php
index b9ac904baae4aa23d81c00be64eb44ab3a93be0f..7bcf9d2aab6b3760390736507880e59b07d8541b 100644 (file)
@@ -1,9 +1,8 @@
 <?php
-// $Id$
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -52,6 +51,7 @@ function civicrm_api3_mailing_group_event_unsubscribe($params) {
 
 /**
  * Handle a site-level unsubscribe event
+ * @deprecated
  *
  * @param array $params
  *
@@ -97,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);
 }