Make WordPress Core


Ignore:
Timestamp:
08/20/2014 05:08:41 PM (11 years ago)
Author:
ocean90
Message:

Media: Remove scan for lost attachments.

This hasn't been worked for 4 years.

fixes #29169.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/upload.php

    r29280 r29550  
    9090
    9191    switch ( $doaction ) {
    92         case 'find_detached':
    93             if ( !current_user_can('edit_posts') )
    94                 wp_die( __('You are not allowed to scan for lost attachments.') );
    95 
    96             $lost = $wpdb->get_col( "
    97                 SELECT ID FROM $wpdb->posts
    98                 WHERE post_type = 'attachment' AND post_parent > '0'
    99                 AND post_parent NOT IN (
    100                     SELECT ID FROM $wpdb->posts
    101                     WHERE post_type NOT IN ( 'attachment', '" . join( "', '", get_post_types( array( 'public' => false ) ) ) . "' )
    102                 )
    103             " );
    104 
    105             $_REQUEST['detached'] = 1;
    106             break;
    10792        case 'attach':
    10893            $parent_id = (int) $_REQUEST['found_post_id'];
Note: See TracChangeset for help on using the changeset viewer.