From bdd1643a7d316bdeaeca564412b4f83cd40199fd Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 9 Jul 2004 12:31:33 +0000 Subject: - added splitting of topics to mcp - added merging of posts to mcp - fixed parsing of acl_getf results - adjusted tracking code for important announcements (seems to work now) git-svn-id: file:///svn/phpbb/trunk@4923 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/mcp/mcp_post.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 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 c1ecd3325b..00570964a8 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -84,6 +84,35 @@ function mcp_post_details($id, $mode, $action, $url) ); break; + case 'chgposter': + + $new_user = request_var('u', 0); + + if ($new_user && $auth->acl_get('m_', $post_info['forum_id']) && $new_user != $post_info['user_id']) + { + $sql = 'UPDATE ' . POSTS_TABLE . " + SET poster_id = $new_user + WHERE post_id = $post_id"; + $db->sql_query($sql); + + if ($post_info['topic_last_post_id'] == $post_info['post_id'] || $post_info['forum_last_post_id'] == $post_info['post_id']) + { + sync('topic', 'topic_id', $post_info['topic_id'], false, false); + sync('forum', 'forum_id', $post_info['forum_id'], false, false); + } + + // Renew post info + $post_info = get_post_data(array($post_id)); + + if (!sizeof($post_info)) + { + trigger_error($user->lang['POST_NOT_EXIST']); + } + + $post_info = $post_info[$post_id]; + } + break; + default: } @@ -215,4 +244,6 @@ function mcp_post_details($id, $mode, $action, $url) } } -} \ No newline at end of file +} + +?> \ No newline at end of file -- cgit v1.2.1