Fix attachment queries. fixes #2041

git-svn-id: http://svn.automattic.com/wordpress/trunk@3293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-12 01:33:46 +00:00
parent 9d75e305a2
commit 2a4aafe9b9
1 changed files with 1 additions and 1 deletions

View File

@ -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();