Make WordPress Core

Ticket #6838: 6838.diff

File 6838.diff, 639 bytes (added by mdawaffe, 18 years ago)
  • wp-admin/media.php

     
    99
    1010switch( $action ) :
    1111case 'editattachment' :
    12         $errors = media_upload_form_handler();
    1312        $attachment_id = (int) $_POST['attachment_id'];
    14 
    1513        check_admin_referer('media-form');
    1614
    1715        if ( !current_user_can('edit_post', $attachment_id) )
    1816                wp_die ( __('You are not allowed to edit this attachment.') );
    1917
     18        $errors = media_upload_form_handler();
     19
    2020        if ( empty($errors) ) {
    2121                $location = 'media.php';
    2222                if ( $referer = wp_get_original_referer() ) {