aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-10-06 22:25:08 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-10-06 22:25:08 +0200
commit3c91fbeaa6b42df1a2066fe5c7970e6657d81569 (patch)
treeec3f2ca413229c4fbd131f7b4d436ce60f1812b0
parent2f2a30699419f000abc5513ba8b72abf40843a36 (diff)
parent9d9685eec93c4d88195bea6bd9f9faf3a81a0671 (diff)
downloadforums-3c91fbeaa6b42df1a2066fe5c7970e6657d81569.tar
forums-3c91fbeaa6b42df1a2066fe5c7970e6657d81569.tar.gz
forums-3c91fbeaa6b42df1a2066fe5c7970e6657d81569.tar.bz2
forums-3c91fbeaa6b42df1a2066fe5c7970e6657d81569.tar.xz
forums-3c91fbeaa6b42df1a2066fe5c7970e6657d81569.zip
Merge pull request #2827 from brunoais/ticket/12929
[ticket/12929] core.ucp_pm_compose_compose_pm_basic_info_query_before
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 01c2041f42..515553c6db 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -233,6 +233,42 @@ 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 msg_id topic_id in the page request
+ * @var int to_user_id The id of whom the message is to
+ * @var int to_group_id The id of the group whom the message is to
+ * @var bool submit Whether the user is sending the PM or not
+ * @var bool preview Whether the user is previewing the PM or not
+ * @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies
+ * @var bool delete Whether the user is deleting the PM
+ * @var int reply_to_all Value of reply_to_all request variable.
+ * @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-RC5
+ */
+ $vars = array(
+ 'sql',
+ 'forum_list',
+ 'visibility_const',
+ 'msg_id',
+ 'to_user_id',
+ 'to_group_id',
+ 'submit',
+ 'preview',
+ 'action',
+ 'delete',
+ 'reply_to_all',
+ '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);