aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_post.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-02 15:23:33 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-02 15:23:33 +0000
commita3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5 (patch)
treee13dd92e386cb98de51bd0730fdd569efe6e5f36 /phpBB/includes/mcp/mcp_post.php
parent21a002e4ac28f8e65e2c865eb171a44ac4054044 (diff)
downloadforums-a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5.tar
forums-a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5.tar.gz
forums-a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5.tar.bz2
forums-a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5.tar.xz
forums-a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5.zip
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
Diffstat (limited to 'phpBB/includes/mcp/mcp_post.php')
-rw-r--r--phpBB/includes/mcp/mcp_post.php11
1 files changed, 10 insertions, 1 deletions
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'];