WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/14/2011 07:47:29 PM (9 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r17771 r17929  
    768768
    769769        //get pages in order of hierarchy, i.e. children after parents
    770         $posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));
     770        $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'") );
    771771
    772772        // If we have no pages get out quick
Note: See TracChangeset for help on using the changeset viewer.