From 310940b824eff4a116dcd72ccd339bb602021981 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 10 Jun 2008 14:08:54 +0000 Subject: Merge with branches/2.5 in WordPress, revision 8066 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1324 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/async-upload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wp-admin/async-upload.php') diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index 1a37dce..c1c0f0d 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -15,7 +15,7 @@ if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) unset($current_user); require_once('admin.php'); -header('Content-Type: text/plain'); +header('Content-Type: text/plain; charset=' . get_option('blog_charset')); if ( !current_user_can('upload_files') ) wp_die(__('You do not have permission to upload files.')); @@ -26,6 +26,8 @@ if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) { exit; } +check_admin_referer('media-form'); + $id = media_handle_upload('async-upload', $_REQUEST['post_id']); if (is_wp_error($id)) { echo '
'.wp_specialchars($id->get_error_message()).'
'; -- cgit