Changeset 15496 for trunk/wp-admin/upload.php
- Timestamp:
- 08/12/2010 11:21:05 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/upload.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r15491 r15496 10 10 require_once( './admin.php' ); 11 11 12 if ( !current_user_can('upload_files') ) 13 wp_die(__('You do not have permission to upload files.')); 12 require_once( './includes/default-list-tables.php' ); 13 14 $table = new WP_Media_Table; 15 $table->check_permissions(); 14 16 15 17 // Handle bulk actions 16 if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) ) { 18 if ( isset($_REQUEST['find_detached']) ) { 19 check_admin_referer('bulk-media'); 20 21 if ( !current_user_can('edit_posts') ) 22 wp_die( __('You are not allowed to scan for lost attachments.') ); 23 24 $lost = $wpdb->get_col( " 25 SELECT ID FROM $wpdb->posts 26 WHERE post_type = 'attachment' AND post_parent > '0' 27 AND post_parent NOT IN ( 28 SELECT ID FROM $wpdb->posts 29 WHERE post_type NOT IN ( 'attachment', '" . join( "', '", get_post_types( array( 'public' => false ) ) ) . "' ) 30 ) 31 " ); 32 33 $_REQUEST['detached'] = 1; 34 35 } elseif ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) ) { 17 36 check_admin_referer( 'bulk-media' ); 18 37 … … 112 131 } 113 132 114 require_once( './includes/default-list-tables.php' ); 115 116 $table = new WP_Media_Table; 133 $table->prepare_items(); 117 134 118 135 $title = __('Media Library');
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)