Commit 2c1e4dc1 authored by totten's avatar totten

CRM-15578 - Mailing.submit API - Accept "approval_note"

parent 727933df
......@@ -62,6 +62,7 @@ function civicrm_api3_mailing_create($params, $ids = array()) {
unset($params['approval_date']);
unset($params['approver_id']);
unset($params['approval_status_id']);
unset($params['approval_note']);
}
}
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
......@@ -132,6 +133,8 @@ function _civicrm_api3_mailing_submit_spec(&$spec) {
$spec['id'] = $mailingFields['id'];
$spec['scheduled_date'] = $mailingFields['scheduled_date'];
$spec['approval_date'] = $mailingFields['approval_date'];
$spec['approval_status_id'] = $mailingFields['approval_status_id'];
$spec['approval_note'] = $mailingFields['approval_note'];
}
/**
......@@ -164,6 +167,9 @@ function civicrm_api3_mailing_submit($params) {
$updateParams['approver_id'] = CRM_Core_Session::getLoggedInContactID();
$updateParams['approval_status_id'] = CRM_Utils_Array::value('approval_status_id', $updateParams, CRM_Core_OptionGroup::getDefaultValue('mail_approval_status'));
}
if (isset($params['approval_note'])) {
$updateParams['approval_note'] = $params['approval_note'];
}
$updateParams['options']['reload'] = 1;
return civicrm_api3('Mailing', 'create', $updateParams);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment