summaryrefslogtreecommitdiffstats
path: root/wp-includes/query.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-09-10 18:26:30 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-09-10 18:26:30 +0000
commitb658e546840b8f23e2a1e413f6510104d73ea91f (patch)
tree1cd6bbbda247b5ae6cfff42f2cea731b4d8b667f /wp-includes/query.php
parent305d7e7228e097a26a98abdb45eb8283df7d5603 (diff)
downloadwordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.tar.gz
wordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.tar.xz
wordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.zip
Sync with WP 2.2.3
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1051 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/query.php')
-rw-r--r--wp-includes/query.php21
1 files changed, 10 insertions, 11 deletions
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));
}