]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/rewrite.php
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-includes / rewrite.php
index 92d372e383771445a329ac450f320edcf7fa4f16..46c1b3219f4b43e9dde387809be1b38695f68248 100644 (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 )
@@ -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();
        }
 }