Make WordPress Core


Ignore:
Timestamp:
08/20/2014 05:08:41 PM (12 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/includes/class-wp-media-list-table.php

    r29460 r29550  
    1212    /**
    1313     * Constructor.
    14      * 
     14     *
    1515     * @since 3.1.0
    1616     * @access public
     
    1919     *
    2020     * @param array $args An associative array of arguments.
    21      */ 
     21     */
    2222    public function __construct( $args = array() ) {
    23         $this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
     23        $this->detached = isset( $_REQUEST['detached'] );
    2424
    2525        parent::__construct( array(
     
    3434
    3535    public function prepare_items() {
    36         global $lost, $wp_query, $post_mime_types, $avail_post_mime_types, $mode;
    37 
    38         $q = $_REQUEST;
    39 
    40         if ( !empty( $lost ) )
    41             $q['post__in'] = implode( ',', $lost );
    42 
    43         list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $q );
     36        global $wp_query, $post_mime_types, $avail_post_mime_types, $mode;
     37
     38        list( $post_mime_types, $avail_post_mime_types ) = wp_edit_attachments_query( $_REQUEST );
    4439
    4540        $this->is_trash = isset( $_REQUEST['status'] ) && 'trash' == $_REQUEST['status'];
     
    108103        }
    109104
    110         if ( $this->detached ) {
    111             submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false );
    112         } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
     105        if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {
    113106            submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
    114107        } ?>
     
    118111
    119112    public function current_action() {
    120         if ( isset( $_REQUEST['find_detached'] ) )
    121             return 'find_detached';
    122 
    123113        if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) )
    124114            return 'attach';
Note: See TracChangeset for help on using the changeset viewer.