From 468f92261a1d27deea19863b0180e8acd81c1c64 Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 7 Aug 2014 19:10:32 +0100 Subject: [PATCH] [ticket/12929] core.ucp_pm_compose_compose_pm_basic_info_query_before Adding the core.ucp_pm_compose_compose_pm_basic_info_query_before event to mcp backend. PHPBB3-12929 --- phpBB/includes/ucp/ucp_pm_compose.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 01c2041f42..05ecaa1868 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -233,6 +233,28 @@ function compose_pm($id, $mode, $action, $user_folders = array()) if ($sql) { + /** + * Alter sql query to get message for user to write the PM + * + * @event core.ucp_pm_compose_compose_pm_basic_info_query_before + * @var string sql String with the query to be executed + * @var array forum_list List of forums that contain the posts + * @var int visibility_const Integer with one of the possible ITEM_* constant values + * @var int topic_id topic_id in the page request + * @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string) + * @var string sort_order_sql String with the ORDER BY SQL code used in this query + * @since 3.1.0-RC3 + */ + $vars = array( + 'sql', + 'forum_list', + 'visibility_const', + 'topic_id', + 'limit_time_sql', + 'sort_order_sql', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_compose_pm_basic_info_query_before', compact($vars))); + $result = $db->sql_query($sql); $post = $db->sql_fetchrow($result); $db->sql_freeresult($result);