summaryrefslogtreecommitdiffstats
path: root/wp-includes/query.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-23 10:32:27 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-23 10:32:27 +0000
commit655a7fc3d336fb36671e2d8ab5bda4229aecfdce (patch)
treea377e02196f988c6d3337601fbba79304950da3c /wp-includes/query.php
parentd48e85e0ac5e675ca33fac173f30c75403d1033f (diff)
downloadwordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.tar.gz
wordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.tar.xz
wordpress-mu-655a7fc3d336fb36671e2d8ab5bda4229aecfdce.zip
WP merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@592 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/query.php')
-rw-r--r--wp-includes/query.php23
1 files changed, 11 insertions, 12 deletions
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 .= '))';