From 468f92261a1d27deea19863b0180e8acd81c1c64 Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 7 Aug 2014 19:10:32 +0100 Subject: [PATCH 1/5] [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); From 8880871951cad9fc86326590b9b9e33e5677965c Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 9 Aug 2014 18:13:10 +0100 Subject: [PATCH 2/5] [ticket/12929] Update to RC4 PHPBB3-12929 --- phpBB/includes/ucp/ucp_pm_compose.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 05ecaa1868..3ae2abbce2 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -243,7 +243,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @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 + * @since 3.1.0-RC4 */ $vars = array( 'sql', From 1e1efa294ebfc3802cb072c1ef799b676f796aff Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 10 Aug 2014 18:51:35 +0100 Subject: [PATCH 3/5] [ticket/12929] Adding more variables to event. More variables added that may be useful to events at this stage. PHPBB3-12929 --- phpBB/includes/ucp/ucp_pm_compose.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 3ae2abbce2..0458135e03 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -241,6 +241,13 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @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 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 bool action One of: post, reply, quote, forward, quotepost, edit, delete, smilies + * @var bool delete If deleting message + * @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-RC4 @@ -250,6 +257,13 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'forum_list', 'visibility_const', 'topic_id', + 'to_user_id', + 'to_group_id', + 'submit', + 'preview', + 'action', + 'delete', + 'reply_to_all', 'limit_time_sql', 'sort_order_sql', ); From d4938e34b03f6738646dfd8bd15731adc73f5bc9 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 19 Sep 2014 08:36:00 +0100 Subject: [PATCH 4/5] [ticket/12929] Fixing event comment block and variable PHPBB3-12929 --- phpBB/includes/ucp/ucp_pm_compose.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 0458135e03..89ba77e7cf 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -240,13 +240,13 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @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 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 bool action One of: post, reply, quote, forward, quotepost, edit, delete, smilies - * @var bool delete If deleting message + * @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 @@ -256,7 +256,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'sql', 'forum_list', 'visibility_const', - 'topic_id', + 'msg_id', 'to_user_id', 'to_group_id', 'submit', From 9d9685eec93c4d88195bea6bd9f9faf3a81a0671 Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 2 Oct 2014 14:44:43 +0100 Subject: [PATCH 5/5] [ticket/12929] BUMP to RC5 PHPBB3-12929 --- phpBB/includes/ucp/ucp_pm_compose.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 89ba77e7cf..515553c6db 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -250,7 +250,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @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-RC4 + * @since 3.1.0-RC5 */ $vars = array( 'sql',