From 07b55530ec21f4e0ad163770590663d832218f71 Mon Sep 17 00:00:00 2001 From: Kailey Truscott Date: Wed, 16 Sep 2015 22:37:29 -0400 Subject: [ticket/14170] Fix mcp_change_poster_after event Move the mcp_change_poster_after event to before renewing $post_info. I changed the "since" version as this would be fixed in 3.1.7-RC1. PHPBB3-14170 --- phpBB/includes/mcp/mcp_post.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'phpBB/includes/mcp') diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 7a93f73228..8bfee8508f 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -549,27 +549,27 @@ function change_poster(&$post_info, $userdata) $from_username = $post_info['username']; $to_username = $userdata['username']; - // Renew post info - $post_info = phpbb_get_post_data(array($post_id), false, true); - - if (!sizeof($post_info)) - { - trigger_error('POST_NOT_EXIST'); - } - - $post_info = $post_info[$post_id]; - /** * This event allows you to perform additional tasks after changing a post's poster * * @event core.mcp_change_poster_after * @var array userdata Information on a post's new poster * @var array post_info Information on the affected post - * @since 3.1.6-RC1 + * @since 3.1.7-RC1 */ $vars = array('userdata', 'post_info'); extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars))); + // Renew post info + $post_info = phpbb_get_post_data(array($post_id), false, true); + + if (!sizeof($post_info)) + { + trigger_error('POST_NOT_EXIST'); + } + + $post_info = $post_info[$post_id]; + // Now add log entry add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $from_username, $to_username); } -- cgit v1.2.1 From 08739751b211c147b58a80a55f3bbde00a96e005 Mon Sep 17 00:00:00 2001 From: Kailey Truscott Date: Tue, 13 Oct 2015 21:26:24 -0400 Subject: [ticket/14170] Revert mcp_change_poster_after @since change Revert the @since change back to 3.1.6-RC1. Add @changed line 3.1.7-RC1 and description. PHPBB3-14170 --- phpBB/includes/mcp/mcp_post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/mcp') diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 8bfee8508f..2dcfcd608b 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -555,7 +555,8 @@ function change_poster(&$post_info, $userdata) * @event core.mcp_change_poster_after * @var array userdata Information on a post's new poster * @var array post_info Information on the affected post - * @since 3.1.7-RC1 + * @since 3.1.6-RC1 + * @changed 3.1.7-RC1 Change location to prevent post_info from being set to the new post information */ $vars = array('userdata', 'post_info'); extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars))); -- cgit v1.2.1