Don't fetch auto-draft pages in WP_Rewrite::page_uri_index(). props duck_, see #17176.

git-svn-id: https://develop.svn.wordpress.org/trunk@17929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-05-14 19:47:29 +00:00
parent 02e8db225f
commit 1c3bcac7fd
1 changed files with 1 additions and 1 deletions

View File

@ -767,7 +767,7 @@ class WP_Rewrite {
global $wpdb;
//get pages in order of hierarchy, i.e. children after parents
$posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));
$posts = get_page_hierarchy( $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'") );
// If we have no pages get out quick
if ( !$posts )