diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-10 14:08:54 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-10 14:08:54 +0000 |
| commit | 310940b824eff4a116dcd72ccd339bb602021981 (patch) | |
| tree | 19f6efc7b30b9456eebc26d578c5dc7e125bb6e7 /wp-admin/async-upload.php | |
| parent | 616f7399dc4c4f7c56951c7b87a7aa91b3e690a3 (diff) | |
| download | wordpress-mu-310940b824eff4a116dcd72ccd339bb602021981.tar.gz wordpress-mu-310940b824eff4a116dcd72ccd339bb602021981.tar.xz wordpress-mu-310940b824eff4a116dcd72ccd339bb602021981.zip | |
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
Diffstat (limited to 'wp-admin/async-upload.php')
| -rw-r--r-- | wp-admin/async-upload.php | 4 |
1 files changed, 3 insertions, 1 deletions
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 '<div id="media-upload-error">'.wp_specialchars($id->get_error_message()).'</div>'; |
