projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ff896e
)
CRM-16063 - MailingComponent.create API - is_active=1 by default
author
Tim Otten
<totten@civicrm.org>
Sat, 7 Mar 2015 04:29:01 +0000
(20:29 -0800)
committer
Tim Otten
<totten@civicrm.org>
Sat, 7 Mar 2015 04:29:15 +0000
(20:29 -0800)
api/v3/MailingComponent.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/MailingComponent.php
b/api/v3/MailingComponent.php
index 811fdefb85df4162105f3f294faf8b967db49a8f..6284cdbc0cb874a73c502e011299778bb76c3238 100644
(file)
--- 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
*