Index: post.php
===================================================================
--- post.php	(revision 11087)
+++ post.php	(working copy)
@@ -2153,7 +2153,7 @@
  * @return array List of pages matching defaults or $args
  */
 function &get_pages($args = '') {
-	global $wpdb;
+	global $wpdb, $user_ID;
 
 	$defaults = array(
 		'child_of' => 0, 'sort_order' => 'ASC',
@@ -2258,8 +2258,16 @@
 	if ( $parent >= 0 )
 		$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
 
-	$query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where ";
-	$query .= $author_query;
+	$query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page'";
+	$where .= " AND (post_status = 'publish'";
+	if ( is_admin() )
+		$where .= " OR post_status = 'future' OR post_status = 'draft' OR post_status = 'pending'";
+	if ( is_user_logged_in() ) {
+		$where .= current_user_can( "read_private_pages" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'";
+	}
+	$where .= ')';
+		
+	$query .= " $where )" . $author_query;
 	$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
 
 	$pages = $wpdb->get_results($query);
