From d1719f828e75c8c28da43487174969737c5ecabf Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 20 Nov 2015 11:32:34 +0530 Subject: [PATCH] CRM-15306: Adding hook to alter mail templates ---------------------------------------- * CRM-15306: Adding hook to alter mail templates https://issues.civicrm.org/jira/browse/CRM-15306 --- CRM/Mailing/BAO/Mailing.php | 2 +- CRM/Utils/Hook.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 4b36fc453b..48d8dbbaeb 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -803,7 +803,7 @@ ORDER BY i.contact_id, i.{$tempColumn} $this->templates['subject'] = implode("\n", $template); } - CRM_Utils_Hook::alterMailTemplates($this->templates); + CRM_Utils_Hook::alterMailContent($this->templates); } return $this->templates; } diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index af9744cb55..242a7b4d37 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1001,15 +1001,15 @@ abstract class CRM_Utils_Hook { /** * This hook is called after getting the content of the mail and before tokenizing it. * - * @param array $templates + * @param array $content * Array fields include: html, text, subject * * @return mixed */ - public static function alterMailTemplates(&$templates) { - return self::singleton()->invoke(1, $templates, + public static function alterMailContent(&$content) { + return self::singleton()->invoke(1, $content, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, - 'civicrm_alterMailTemplates' + 'civicrm_alterMailContent' ); } -- 2.25.1