aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_email.php
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2015-01-11 19:14:25 +0100
committerOliver Schramm <oliver.schramm97@gmail.com>2015-01-11 20:55:00 +0100
commit3bfd87cda4e77479dd47cadc09f27956f35cd78a (patch)
tree4de09cce1514cdcfe06a900335630908b240946c /phpBB/includes/acp/acp_email.php
parente8464d7fe235bf2c5ac428fc38a7fada4bcfb1bb (diff)
downloadforums-3bfd87cda4e77479dd47cadc09f27956f35cd78a.tar
forums-3bfd87cda4e77479dd47cadc09f27956f35cd78a.tar.gz
forums-3bfd87cda4e77479dd47cadc09f27956f35cd78a.tar.bz2
forums-3bfd87cda4e77479dd47cadc09f27956f35cd78a.tar.xz
forums-3bfd87cda4e77479dd47cadc09f27956f35cd78a.zip
[ticket/13313] Add event core.acp_email_display
PHPBB3-13313
Diffstat (limited to 'phpBB/includes/acp/acp_email.php')
-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..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 .= '<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.3-RC1
+ */
+ $vars = array('template_data', 'exclude', 'usernames');
+ extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));
+
+ $template->assign_vars($template_data);
}
}