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

git-svn-id: http://core.svn.wordpress.org/trunk@21946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Westwood 2012-09-21 21:48:52 +00:00
parent 51326aaf91
commit 8b9ab93511

View File

@ -238,7 +238,7 @@ function export_wp( $args = array() ) {
global $wpdb; global $wpdb;
$authors = array(); $authors = array();
$results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts" ); $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'" );
foreach ( (array) $results as $result ) foreach ( (array) $results as $result )
$authors[] = get_userdata( $result->post_author ); $authors[] = get_userdata( $result->post_author );