From: Tim Otten Date: Sat, 7 Mar 2015 04:29:01 +0000 (-0800) Subject: CRM-16063 - MailingComponent.create API - is_active=1 by default X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=143fcffa5d0b50f6927d59dc693aa518f7c57dc0;p=civicrm-core.git CRM-16063 - MailingComponent.create API - is_active=1 by default --- diff --git a/api/v3/MailingComponent.php b/api/v3/MailingComponent.php index 811fdefb85..6284cdbc0c 100644 --- a/api/v3/MailingComponent.php +++ b/api/v3/MailingComponent.php @@ -51,6 +51,19 @@ function civicrm_api3_mailing_component_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } + +/** + * Adjust Metadata for Create action. + * + * The metadata is used for setting defaults, documentation & validation. + * + * @param array $spec + * Array of parameters determined by getfields. + */ +function _civicrm_api3_mailing_component_create_spec(&$spec) { + $spec['is_active']['api.default'] = 1; +} + /** * Get a mailing_component *