From a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 2 Nov 2006 15:23:33 +0000 Subject: some updates; and hopefully not completely breaking redirects (again). :D You know, i like breaking things. git-svn-id: file:///svn/phpbb/trunk@6544 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_post.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/mcp/mcp_post.php') diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 189ee5c326..201137a9a4 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -372,7 +372,16 @@ function change_poster(&$post_info, $userdata) } } - // Do not change the poster_id within the attachments table, since they were still posted by the original user + // change the poster_id within the attachments table, else the data becomes out of sync and errors displayed because of wrong ownership + if ($post_info['post_attachment']) + { + $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' + SET poster_id = ' . $userdata['user_id'] . ' + WHERE poster_id = ' . $post_info['user_id'] . ' + AND post_msg_id = ' . $post_info['post_id'] . ' + AND topic_id = ' . $post_info['topic_id']; + $db->sql_query($sql); + } $from_username = $post_info['username']; $to_username = $userdata['username']; -- cgit v1.2.1