From 3bfd87cda4e77479dd47cadc09f27956f35cd78a Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 11 Jan 2015 19:14:25 +0100 Subject: [PATCH 1/2] [ticket/13313] Add event core.acp_email_display PHPBB3-13313 --- phpBB/includes/acp/acp_email.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index fcc2bd7641..dc48171fe3 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -314,7 +314,7 @@ class acp_email $s_priority_options .= ''; $s_priority_options .= ''; - $template->assign_vars(array( + $template_data = array( 'S_WARNING' => (sizeof($error)) ? true : false, 'WARNING_MSG' => (sizeof($error)) ? implode('
', $error) : '', 'U_ACTION' => $this->u_action, @@ -323,8 +323,22 @@ class acp_email 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames'), 'SUBJECT' => $subject, 'MESSAGE' => $message, - 'S_PRIORITY_OPTIONS' => $s_priority_options) + 'S_PRIORITY_OPTIONS' => $s_priority_options, ); + /** + * Modify custom email template data before we display the form + * + * @event core.acp_email_display + * @var array template_data Array with template data assigned to email template + * @var array exclude Array with groups which are excluded from group selection + * @var array usernames Usernames which will be displayed in form + * + * @since 3.1.3-RC1 + */ + $vars = array('template_data', 'exclude', 'usernames'); + extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars))); + + $template->assign_vars($template_data); } } From c6557e3800c9fb4d20ac47afae3fb1cff36f4d52 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 15 Jan 2015 22:08:10 +0100 Subject: [PATCH 2/2] [ticket/13313] Update version in @since tag of event PHPBB3-13313 --- phpBB/includes/acp/acp_email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index dc48171fe3..fda9d50779 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -334,7 +334,7 @@ class acp_email * @var array exclude Array with groups which are excluded from group selection * @var array usernames Usernames which will be displayed in form * - * @since 3.1.3-RC1 + * @since 3.1.4-RC1 */ $vars = array('template_data', 'exclude', 'usernames'); extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));