Ticket #16820: 16820.2.diff
File 16820.2.diff, 632 bytes (added by , 10 years ago) |
---|
-
wp-admin/media-new.php
25 25 } 26 26 27 27 if ( $_POST ) { 28 $location = 'upload.php';29 28 if ( isset($_POST['html-upload']) && !empty($_FILES) ) { 30 29 check_admin_referer('media-form'); 31 30 // Upload File button was clicked 32 31 $id = media_handle_upload( 'async-upload', $post_id ); 33 32 if ( is_wp_error( $id ) ) 34 $location .= '?message=3';33 wp_die( $id ); 35 34 } 36 wp_redirect( admin_url( $location) );35 wp_redirect( admin_url( 'upload.php' ) ); 37 36 exit; 38 37 } 39 38