Ticket #33672: 33672.diff
File 33672.diff, 1.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/media-upload.php
15 15 /** Load WordPress Administration Bootstrap */ 16 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 17 17 18 if (!current_user_can('upload_files')) 19 wp_die(__('You do not have permission to upload files.')); 18 if ( ! current_user_can( 'upload_files' ) ) { 19 wp_die( __( 'You do not have permission to upload files.' ), 403 ); 20 } 20 21 21 22 wp_enqueue_script('plupload-handlers'); 22 23 wp_enqueue_script('image-edit'); … … 32 33 33 34 // Require an ID for the edit screen. 34 35 if ( isset($action) && $action == 'edit' && !$ID ) { 35 wp_die( __( 'Cheatin’ uh?' ), 403 ); 36 wp_die( 37 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 38 '<p>' . __( 'This is not a valid item.' ) . '</p>', 39 403 ); 36 40 } 37 41 38 42 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) { 39 wp_die( __( 'Cheatin’ uh?' ), 403 ); 43 wp_die( 44 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 45 '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', 46 403 ); 40 47 } 41 48 42 49 // Upload type: image, video, file, ..?