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

git-svn-id: http://svn.automattic.com/wordpress/trunk@15501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-08-16 01:36:21 +00:00
parent 31b188da6e
commit f2614ac277
2 changed files with 2 additions and 6 deletions

View File

@ -62,7 +62,7 @@ class WP_Posts_Table extends WP_List_Table {
$avail_post_stati = wp_edit_posts_query();
$this->hierarchical_display = ( $post_type_object->hierarchical && 0 === strpos( get_query_var( 'orderby' ), 'menu_order' ) );
$this->hierarchical_display = ( $post_type_object->hierarchical && 'menu_order title' == $wp_query->query['orderby'] );
$total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts;

View File

@ -1246,11 +1246,7 @@ class WP_Query {
function parse_query($query) {
if ( !empty($query) || !isset($this->query) ) {
$this->init();
if ( is_array($query) )
$this->query_vars = $query;
else
parse_str($query, $this->query_vars);
$this->query = $query;
$this->query = $this->query_vars = wp_parse_args($query);
}
$this->query_vars = $this->fill_query_vars($this->query_vars);