From a9673a9147d8d2eea3dda51cc46dbcc49d548ee4 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 21 Sep 2012 21:48:52 +0000 Subject: [PATCH] Export: Ignore auto-drafts when building the list of users for the export file. Fixes #21960. git-svn-id: https://develop.svn.wordpress.org/trunk@21946 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 658cfc909b..c66b7f3630 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -238,7 +238,7 @@ function export_wp( $args = array() ) { global $wpdb; $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 ) $authors[] = get_userdata( $result->post_author );