From 1d38abdd7e4d599d793fb1e3c163db461fb43348 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 23 Jan 2017 14:14:36 +0100 Subject: [PATCH] [ticket/13605] Add core.ucp_pm_compose_predefined_message event PHPBB3-13605 --- phpBB/includes/ucp/ucp_pm_compose.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index d365e8b489..4906eec1bb 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -450,6 +450,17 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $message_attachment = 0; $message_text = $message_subject = ''; + /** + * Predefine message text and subject + * + * @event core.ucp_pm_compose_predefined_message + * @var string message_text Message text + * @var string message_subject Messate subject + * @since 3.1.11-RC1 + */ + $vars = array('message_text', 'message_subject'); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_predefined_message', compact($vars))); + if ($to_user_id && $to_user_id != ANONYMOUS && $action == 'post') { $address_list['u'][$to_user_id] = 'to';