<?php
-// $Id$
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
*
*/
-/**
- * Files required for this package
- */
-
-
-
-require_once 'CRM/Contact/BAO/Group.php';
-require_once 'CRM/Mailing/Event/BAO/Queue.php';
-require_once 'CRM/Mailing/Event/BAO/Subscribe.php';
-require_once 'CRM/Mailing/Event/BAO/Unsubscribe.php';
-require_once 'CRM/Mailing/Event/BAO/Resubscribe.php';
-require_once 'CRM/Mailing/Event/BAO/TrackableURLOpen.php';
-
/**
* Handle an unsubscribe event
* @deprecated
/**
* Handle a site-level unsubscribe event
+ * @deprecated
*
* @param array $params
*
function civicrm_api3_mailing_group_getfields($params) {
$dao = _civicrm_api3_get_DAO('Subscribe');
- $file = str_replace('_', '/', $dao) . ".php";
- require_once ($file);
$d = new $dao();
$fields = $d->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);
}