aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-02 23:00:29 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-02 23:00:29 +0100
commit7254a52812c8cda2f76caa969cb4ff7720d85253 (patch)
tree1e4fdb6abe17ffc400a5c6d1069bcbcc8571fb9d
parent5182d02da51f95e26b7e9c00881aa8251e1bdcbd (diff)
parentc6557e3800c9fb4d20ac47afae3fb1cff36f4d52 (diff)
downloadforums-7254a52812c8cda2f76caa969cb4ff7720d85253.tar
forums-7254a52812c8cda2f76caa969cb4ff7720d85253.tar.gz
forums-7254a52812c8cda2f76caa969cb4ff7720d85253.tar.bz2
forums-7254a52812c8cda2f76caa969cb4ff7720d85253.tar.xz
forums-7254a52812c8cda2f76caa969cb4ff7720d85253.zip
Merge pull request #3282 from Elsensee/ticket/13313
[ticket/13313] Add event core.acp_email_display
-rw-r--r--phpBB/includes/acp/acp_email.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index fcc2bd7641..fda9d50779 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 .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
- $template->assign_vars(array(
+ $template_data = array(
'S_WARNING' => (sizeof($error)) ? true : false,
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $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&amp;form=acp_email&amp;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.4-RC1
+ */
+ $vars = array('template_data', 'exclude', 'usernames');
+ extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));
+
+ $template->assign_vars($template_data);
}
}