MailingGroup API - Tighten up deprecations
authorTim Otten <totten@civicrm.org>
Fri, 24 Feb 2017 06:13:06 +0000 (23:13 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 24 Feb 2017 06:17:08 +0000 (23:17 -0700)
The `MailingGroup.php` includes some very different APIs, e.g.
 * Several 'event'(subscribue/resubscribe) APIs
 * Some CRUD APIs for mailing data

The deprecation applies to the 'event' (subscribe/resubscribe) APIs --
because those can be done another way.  However, the CRUD for `MailingGroup`
records is the only way to do access that data.

api/v3/MailingGroup.php

index 0dbac4513f799bf49d8811d6faa7e37932d747f5..9a7a6ef67af572b629225fea722a2088d9cdd0c0 100644 (file)
  *   to indicate this entire api entity is deprecated
  */
 function _civicrm_api3_mailing_group_deprecation() {
-  return 'The MailingGroup api is deprecated. Use the mailing_event apis instead.';
+  $message = 'This action is deprecated. Use the mailing_event API instead.';
+  return array(
+    'event_unsubscribe' => $message,
+    'event_domain_unsubscribe' => $message,
+    'event_resubscribe' => $message,
+    'event_subscribe' => $message,
+  );
 }
 
 /**