Ticket #8592: post-r16235.diff
File post-r16235.diff, 818 bytes (added by , 13 years ago) |
---|
-
post.php
3379 3379 if ( $parent >= 0 ) 3380 3380 $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); 3381 3381 3382 $where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status = '%s'", $post_type, $post_status ); 3382 if (current_user_can('read_private_pages') && 'page' == $post_type) 3383 $where_post_type = $wpdb->prepare( "post_type = '%s' AND (post_status = '%s' OR post_status = '%s')", $post_type, $post_status, 'private' ); 3384 else 3385 $where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status = '%s'", $post_type, $post_status ); 3383 3386 3384 3387 $query = "SELECT * FROM $wpdb->posts $join WHERE ($where_post_type) $where "; 3385 3388 $query .= $author_query;