Make WordPress Core


Ignore:
Timestamp:
05/29/2007 04:28:10 AM (18 years ago)
Author:
ryan
Message:

Post and page management filter additions from mdawaffe. see #3945

File:
1 edited

Legend:

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

    r5542 r5587  
    285285
    286286function wp_upload_tab_browse() {
    287     global $wpdb, $action, $paged;
     287    global $action, $paged;
    288288    $old_vars = compact( 'paged' );
    289289
     
    302302        if ( 'browse' == $tab && $post_id )
    303303            add_filter( 'posts_where', 'wp_upload_posts_where' );
    304         $attachments = query_posts("what_to_show=posts&posts_per_page=10&paged=$paged");
    305         $count_query = "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'";
    306         if ( $post_id )
    307             $count_query .= " AND post_parent = '$post_id'";
    308             $total =  $wpdb->get_var($count_query);
     304        $attachments = query_posts("what_to_show=posts&post_status=any&posts_per_page=10&paged=$paged");
    309305
    310306        echo "<ul id='upload-files'>\n";
Note: See TracChangeset for help on using the changeset viewer.