From 655a7fc3d336fb36671e2d8ab5bda4229aecfdce Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 23 Jun 2006 10:32:27 +0000 Subject: WP merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@592 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/query.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'wp-includes/query.php') diff --git a/wp-includes/query.php b/wp-includes/query.php index ae6ecbe..3bb98b0 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -850,20 +850,19 @@ class WP_Query { } else { $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; - if ( is_admin() ) { + if ( is_admin() ) $where .= " OR post_status = 'future' OR post_status = 'draft'"; - if ( is_user_logged_in() ) { - if ( 'post' == $post_type ) - $cap = 'edit_private_posts'; - else - $cap = 'edit_private_pages'; - - if ( current_user_can($cap) ) - $where .= "OR post_status = 'private'"; - else - $where .= " OR post_author = $user_ID AND post_status = 'private'"; - } + if ( is_user_logged_in() ) { + if ( 'post' == $post_type ) + $cap = 'edit_private_posts'; + else + $cap = 'edit_private_pages'; + + if ( current_user_can($cap) ) + $where .= " OR post_status = 'private'"; + else + $where .= " OR post_author = $user_ID AND post_status = 'private'"; } $where .= '))'; -- cgit