From b658e546840b8f23e2a1e413f6510104d73ea91f Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 10 Sep 2007 18:26:30 +0000 Subject: Sync with WP 2.2.3 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1051 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/query.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'wp-includes/query.php') diff --git a/wp-includes/query.php b/wp-includes/query.php index 05dc692..a079211 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -413,18 +413,8 @@ class WP_Query { $this->query_vars = $this->fill_query_vars($this->query_vars); $qv = &$this->query_vars; - if ( ! empty($qv['robots']) ) { + if ( ! empty($qv['robots']) ) $this->is_robots = true; - return; - } - - if ('404' == $qv['error']) { - $this->is_404 = true; - if ( !empty($query) ) { - do_action_ref_array('parse_query', array(&$this)); - } - return; - } $qv['p'] = (int) $qv['p']; $qv['page_id'] = (int) $qv['page_id']; @@ -606,12 +596,21 @@ class WP_Query { } } + if ( !empty($qv['post_type']) ) + $qv['post_type'] = sanitize_user($qv['post_type'], true); + + if ( !empty($qv['post_status']) ) + $qv['post_status'] = sanitize_user($qv['post_status'], true); + if ( $this->is_posts_page && !$qv['withcomments'] ) $this->is_comment_feed = false; $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment; // Done correcting is_* for page_on_front and page_for_posts + if ('404' == $qv['error']) + $this->set_404(); + if ( !empty($query) ) do_action_ref_array('parse_query', array(&$this)); } -- cgit