Make WordPress Core

Ticket #6629: legacy-uploader-fix-r7567.patch

File legacy-uploader-fix-r7567.patch, 803 bytes (added by tellyworth, 18 years ago)
  • wp-admin/includes/media.php

     
    202202function media_upload_form_handler() {
    203203        check_admin_referer('media-form');
    204204
    205         // Insert media button was clicked
    206         if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
    207                 // Upload File button was clicked
    208 
    209                 $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
    210 
    211                 if ( is_wp_error($id) ) {
    212                         $errors['upload_error'] = $id;
    213                         $id = false;
    214                 }
    215         }
    216 
    217205        if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) {
    218206                $post = $_post = get_post($attachment_id, ARRAY_A);
    219207                if ( isset($attachment['post_content']) )