From 236adf6a77f43a85987ec3ff55ebe8b61a0d4b42 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 22 Nov 2017 16:14:56 -0800 Subject: [PATCH] CRM-21472 - Allow FlexMailer to overload checkSendable() --- api/v3/Mailing.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 6a7e4f3d3b..903cd80f7d 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -74,7 +74,8 @@ function civicrm_api3_mailing_create($params) { if (!$timestampCheck) { throw new API_Exception("Mailing has not been saved, Content maybe out of date, please refresh the page and try again"); } - $safeParams['_evil_bao_validator_'] = 'CRM_Mailing_BAO_Mailing::checkSendable'; + + $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); } -- 2.25.1