Retore p_status. see #9674

git-svn-id: https://develop.svn.wordpress.org/trunk@13049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-02-10 20:37:18 +00:00
parent 5c5ceba9bf
commit f932c77406
2 changed files with 7 additions and 3 deletions

View File

@ -2102,8 +2102,12 @@ class WP_Query {
$r_status[] = "$wpdb->posts.post_status <> 'trash'";
} else {
foreach ( get_post_stati() as $status ) {
if ( in_array( $status, $q_status ) )
$r_status[] = "$wpdb->posts.post_status = '$status'";
if ( in_array( $status, $q_status ) ) {
if ( 'private' == $status )
$p_status[] = "$wpdb->posts.post_status = '$status'";
else
$r_status[] = "$wpdb->posts.post_status = '$status'";
}
}
}