Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21472 - Allow FlexMailer to take over token validation #11316

Merged
merged 6 commits into from
Nov 28, 2017
Prev Previous commit
Next Next commit
CRM-21472 - Allow FlexMailer to overload checkSendable() - Comments
  • Loading branch information
totten committed Nov 25, 2017
commit fad7b1050ca136ab41d1325f263f11c57d299512
1 change: 1 addition & 0 deletions api/v3/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function civicrm_api3_mailing_create($params) {
throw new API_Exception("Mailing has not been saved, Content maybe out of date, please refresh the page and try again");
}

// FlexMailer is a refactoring of CiviMail which provides new hooks/APIs/docs. If the sysadmin has opted to enable it, then use that instead of CiviMail.
$safeParams['_evil_bao_validator_'] = \CRM_Utils_Constant::value('CIVICRM_FLEXMAILER_HACK_SENDABLE', 'CRM_Mailing_BAO_Mailing::checkSendable');
$result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $safeParams);
return _civicrm_api3_mailing_get_formatResult($result);
Expand Down