diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 0ae2f100e..a30076996 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -392,10 +392,13 @@ function _media_button($title, $icon, $type, $id) {
return "";
}
-function get_upload_iframe_src( $type = null ) {
+function get_upload_iframe_src( $type = null, $post_id = null ) {
global $post_ID;
- $uploading_iframe_ID = (int) $post_ID;
+ if ( empty( $post_id ) )
+ $post_id = $post_ID;
+
+ $uploading_iframe_ID = (int) $post_id;
$upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') );
if ( $type && 'media' != $type )
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index 252b056e9..d2f26a6cf 100644
--- a/wp-admin/includes/post.php
+++ b/wp-admin/includes/post.php
@@ -1152,7 +1152,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post_id = null ) {
if ( empty( $post_id ) )
$post_id = $post_ID;
- $set_thumbnail_link = '