aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-11-12 08:50:22 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-11-12 08:50:22 +0100
commit77f447c07cd2f95a89afbe18ff4a91b627387de0 (patch)
treeb8e04c9932c537470b223fbd2fa9b7f57406c1b5 /phpBB/includes/mcp
parent87446452f5659d19bd5ae38ac9e90f641f2729a6 (diff)
parent8398e0700aebf24a77c78be1d64b0a5b4a8b4c96 (diff)
downloadforums-77f447c07cd2f95a89afbe18ff4a91b627387de0.tar
forums-77f447c07cd2f95a89afbe18ff4a91b627387de0.tar.gz
forums-77f447c07cd2f95a89afbe18ff4a91b627387de0.tar.bz2
forums-77f447c07cd2f95a89afbe18ff4a91b627387de0.tar.xz
forums-77f447c07cd2f95a89afbe18ff4a91b627387de0.zip
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r--phpBB/includes/mcp/mcp_post.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index e59f0abb04..33aebccb22 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -549,16 +549,6 @@ 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
*
@@ -566,10 +556,21 @@ function change_poster(&$post_info, $userdata)
* @var array userdata Information on a post's new poster
* @var array post_info Information on the affected post
* @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)));
+ // 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
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_MCP_CHANGE_POSTER', false, array(
'forum_id' => $post_info['forum_id'],