Make WordPress Core


Ignore:
Timestamp:
09/21/2012 09:48:52 PM (12 years ago)
Author:
westi
Message:

Export: Ignore auto-drafts when building the list of users for the export file. Fixes #21960.

File:
1 edited

Legend:

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

    r21735 r21946  
    239239
    240240        $authors = array();
    241         $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts" );
     241        $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'" );
    242242        foreach ( (array) $results as $result )
    243243            $authors[] = get_userdata( $result->post_author );
Note: See TracChangeset for help on using the changeset viewer.