diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-12 17:56:52 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-12 17:56:52 +0000 |
| commit | ba4a2062249a4d67aedc18b6991b3cf84d923584 (patch) | |
| tree | 17fcde7a5cbf28d102abf6481e2b882f37338bc3 /wp-inst/wp-includes/classes.php | |
| parent | 239fc296df8cf614a627772d704b051632f5308a (diff) | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@465 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/classes.php')
| -rw-r--r-- | wp-inst/wp-includes/classes.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php index 9d3016f..d4fcc07 100644 --- a/wp-inst/wp-includes/classes.php +++ b/wp-inst/wp-includes/classes.php @@ -631,7 +631,7 @@ class WP_Query { // Check post status to determine if post should be displayed. if ($this->is_single) { $status = get_post_status($this->posts[0]); - if ('publish' != $status) { + if ( ('publish' != $status) && ('static' != $status) ) { if ( ! (isset($user_ID) && ('' != intval($user_ID))) ) { // User must be logged in to view unpublished posts. $this->posts = array(); @@ -734,11 +734,10 @@ class WP_Query { $this->queried_object = $this->post; $this->queried_object_id = $this->post->ID; } else if ($this->is_author) { - global $cache_userdata; - if (isset($cache_userdata[$this->get('author')])) { - $this->queried_object = $cache_userdata[$this->get('author')]; - $this->queried_object_id = $this->get('author'); - } + $author_id = $this->get('author'); + $author = get_userdata($author_id); + $this->queried_object = $author; + $this->queried_object_id = $author_id; } return $this->queried_object; |
