X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/ae01624bdce6b71c47e08e8a0287de58284a6b73..refs/tags/wordpress-3.2-scripts:/wp-includes/rewrite.php diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 92d372e3..46c1b321 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -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 ) @@ -1976,14 +1976,14 @@ class WP_Rewrite { } /** - * PHP4 Constructor - Calls init(), which runs setup. + * Constructor - Calls init(), which runs setup. * * @since 1.5.0 * @access public * * @return WP_Rewrite */ - function WP_Rewrite() { + function __construct() { $this->init(); } }