From 6fafa40d9393af13b594908bb631c4c8e7bdce8d Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 7 Aug 2014 19:35:32 +0100 Subject: [PATCH 1/5] [ticket/12930] core.ucp_pm_compose_compose_pm_quotepost_query_after Adding the core.ucp_pm_compose_compose_pm_quotepost_query_after event to ucp backend. PHPBB3-12930 --- phpBB/includes/ucp/ucp_pm_compose.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 01c2041f42..bc746662aa 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -267,6 +267,22 @@ function compose_pm($id, $mode, $action, $user_folders = array()) trigger_error('NOT_AUTHORISED'); } + /** + * Get the result of querying for the post to be quoted in the pm message + * + * @event core.ucp_pm_compose_quotepost_query_after + * @var array sql The original SQL used in the query + * @var array post Associative array with the result of the quotepost related SQL query + * @var array msg_id The post_id that was searched to get the message for quoting + * @since 3.1.0-RC3 + */ + $vars = array( + 'sql', + 'post', + 'msg_id', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_quotepost_query_after', compact($vars))); + // Passworded forum? if ($post['forum_id']) { From 9f5d383d50bc3abbbd53f76239ea2226d3cee569 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 9 Aug 2014 18:14:11 +0100 Subject: [PATCH 2/5] [ticket/12930] Update to RC4 PHPBB3-12930 --- 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 bc746662aa..b3984e6e8c 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -274,7 +274,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @var array sql The original SQL used in the query * @var array post Associative array with the result of the quotepost related SQL query * @var array msg_id The post_id that was searched to get the message for quoting - * @since 3.1.0-RC3 + * @since 3.1.0-RC4 */ $vars = array( 'sql', From 67de1195660c92299514fb843c2f443dcc83650f Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 10 Aug 2014 18:59:57 +0100 Subject: [PATCH 3/5] [ticket/12930] Adding more variables to the event More variables, according to comments, were added to the event. PHPBB3-12930 --- phpBB/includes/ucp/ucp_pm_compose.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index b3984e6e8c..ab5de019e3 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -271,15 +271,35 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * Get the result of querying for the post to be quoted in the pm message * * @event core.ucp_pm_compose_quotepost_query_after - * @var array sql The original SQL used in the query - * @var array post Associative array with the result of the quotepost related SQL query - * @var array msg_id The post_id that was searched to get the message for quoting + * @var string sql The original SQL used in the query + * @var array post Associative array with the result of the quotepost related SQL query + * @var array msg_id The post_id that was searched to get the message for quoting + * @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. * @since 3.1.0-RC4 */ $vars = array( 'sql', 'post', 'msg_id', + 'forum_list', + 'visibility_const', + 'topic_id', + 'to_user_id', + 'to_group_id', + 'submit', + 'preview', + 'action', + 'delete', + 'reply_to_all', ); extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_quotepost_query_after', compact($vars))); From 55664c1c1076804da9bf572f8329ca17f6b1d276 Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 19 Sep 2014 08:44:12 +0100 Subject: [PATCH 4/5] [ticket/12930] Fixing event comment block and variable According to comments on pull request PHPBB3-12930 --- phpBB/includes/ucp/ucp_pm_compose.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index ab5de019e3..1d961a8497 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -272,16 +272,15 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * * @event core.ucp_pm_compose_quotepost_query_after * @var string sql The original SQL used in the query - * @var array post Associative array with the result of the quotepost related SQL query + * @var array post Associative array with the data of the quoted post * @var array msg_id The post_id that was searched to get the message for quoting - * @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 int visibility_const Visibility of the quoted post (one of the possible ITEM_* constant values) + * @var int topic_id Topic ID of the quoted post + * @var int to_user_id Users the message is sent to + * @var int to_group_id Groups the message is sent 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 string 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. * @since 3.1.0-RC4 @@ -290,7 +289,6 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'sql', 'post', 'msg_id', - 'forum_list', 'visibility_const', 'topic_id', 'to_user_id', From cf2ac569508d6e488a48233f85634b8eb8c9bf51 Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 2 Oct 2014 14:43:50 +0100 Subject: [PATCH 5/5] [ticket/12930] BUMP to RC5 PHPBB3-12930 --- 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 1d961a8497..fe94f4697c 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -283,7 +283,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @var string 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. - * @since 3.1.0-RC4 + * @since 3.1.0-RC5 */ $vars = array( 'sql',