Make WordPress Core

Changeset 15501


Ignore:
Timestamp:
08/16/2010 01:36:21 AM (14 years ago)
Author:
scribu
Message:

Safer hierarchical display check. Fixes #14600; See #14579

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15500 r15501  
    6363        $avail_post_stati = wp_edit_posts_query();
    6464
    65         $this->hierarchical_display = ( $post_type_object->hierarchical && 0 === strpos( get_query_var( 'orderby' ), 'menu_order' ) );
     65        $this->hierarchical_display = ( $post_type_object->hierarchical && 'menu_order title' == $wp_query->query['orderby'] );
    6666
    6767        $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts;
  • trunk/wp-includes/query.php

    r15471 r15501  
    12471247        if ( !empty($query) || !isset($this->query) ) {
    12481248            $this->init();
    1249             if ( is_array($query) )
    1250                 $this->query_vars = $query;
    1251             else
    1252                 parse_str($query, $this->query_vars);
    1253             $this->query = $query;
     1249            $this->query = $this->query_vars = wp_parse_args($query);
    12541250        }
    12551251
Note: See TracChangeset for help on using the changeset viewer.