CRM-21472 - Allow FlexMailer to overload checkSendable() - Comments
authorTim Otten <totten@civicrm.org>
Sat, 25 Nov 2017 01:23:48 +0000 (17:23 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 25 Nov 2017 01:23:48 +0000 (17:23 -0800)
api/v3/Mailing.php

index 903cd80f7d0c2854e920b781254b760214cb7ce2..300ac3b07c8419ca21ef7a294efe6fde53b85d6b 100644 (file)
@@ -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);