diff --git wp-admin/includes/class-wp-posts-list-table.php wp-admin/includes/class-wp-posts-list-table.php
index f25ca4b..0ed5bba 100644
--- wp-admin/includes/class-wp-posts-list-table.php
+++ wp-admin/includes/class-wp-posts-list-table.php
@@ -339,7 +339,7 @@ class WP_Posts_List_Table extends WP_List_Table {
 		$level = 0;
 
 		if ( ! $pages ) {
-			$pages = get_pages( array( 'sort_column' => 'menu_order' ) );
+			$pages = get_pages( array( 'order_by' => 'menu_order' ) );
 
 			if ( ! $pages )
 				return false;
diff --git wp-includes/post-template.php wp-includes/post-template.php
index c3bfa2b..99e39a8 100644
--- wp-includes/post-template.php
+++ wp-includes/post-template.php
@@ -754,17 +754,21 @@ function the_meta() {
  */
 function wp_dropdown_pages($args = '') {
 	$defaults = array(
-		'depth' => 0, 'child_of' => 0,
 		'selected' => 0, 'echo' => 1,
 		'name' => 'page_id', 'id' => '',
 		'show_option_none' => '', 'show_option_no_change' => '',
-		'option_none_value' => ''
+		'option_none_value' => '',
+		'depth' => 0,
 	);
 
+	// pick out only arguments which are to be passed to get_pages()
+	// these arguments will be wp_parse_args() inside get_pages()
+	$get_pages_args = array_diff_key( $args, $defaults );
+	$pages = get_pages($get_pages_args);
+
 	$r = wp_parse_args( $args, $defaults );
 	extract( $r, EXTR_SKIP );
 
-	$pages = get_pages($r);
 	$output = '';
 	$name = esc_attr($name);
 	// Back-compat with old system where both id and name were based on $name argument
diff --git wp-includes/post.php wp-includes/post.php
index b4dea59..678a521 100644
--- wp-includes/post.php
+++ wp-includes/post.php
@@ -1328,12 +1328,12 @@ function set_post_type( $post_id = 0, $post_type = 'post' ) {
  */
 function get_posts($args = null) {
 	$defaults = array(
-		'numberposts' => 5, 'offset' => 0,
-		'category' => 0, 'orderby' => 'post_date',
+		'numberposts' => 5, 'offset' => 0, 'child_of' => 0,
+		'category' => 0, 'orderby' => 'post_date', 'depth' => 0,
 		'order' => 'DESC', 'include' => array(),
 		'exclude' => array(), 'meta_key' => '',
 		'meta_value' =>'', 'post_type' => 'post',
-		'suppress_filters' => true
+		'suppress_filters' => true, 'author' => '',
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -3190,11 +3190,15 @@ function get_page_by_title($page_title, $output = OBJECT, $post_type = 'page' )
  * @param array $pages List of pages' objects.
  * @return array
  */
-function &get_page_children($page_id, $pages) {
+function &get_page_children( $page_id, $pages, $field = 'all' ) {
 	$page_list = array();
 	foreach ( (array) $pages as $page ) {
 		if ( $page->post_parent == $page_id ) {
-			$page_list[] = $page;
+			if ( $field == 'all' ) {
+				$page_list[] = $page;
+			} else {
+				$page_list[] = $page->$field;
+			}
 			if ( $children = get_page_children($page->ID, $pages) )
 				$page_list = array_merge($page_list, $children);
 		}
@@ -3287,172 +3291,41 @@ function get_page_uri($page) {
  * @param mixed $args Optional. Array or string of options that overrides defaults.
  * @return array List of pages matching defaults or $args
  */
-function &get_pages($args = '') {
+function get_pages($args = '') {
 	global $wpdb;
-
+	
+	// matching old arguments with get_posts' arguments
+	if ( isset( $args['parent'] ) ) {
+		$args['post_parent'] = $args['parent'];
+	}
+	if ( isset( $args['sort_order'] ) ) {
+		$args['order'] = $args['sort_order'];
+	}
+	if ( isset( $args['sort_column'] ) ) {
+		$args['order_by'] = $args['sort_column'];
+	}
+	if ( isset( $args['number'] ) ) {
+		$args['numberposts'] = $args['number'];
+	}
+	if ( isset( $args['authors'] ) ) {
+		$args['author'] = $args['authors'];
+	}
+	
 	$defaults = array(
-		'child_of' => 0, 'sort_order' => 'ASC',
-		'sort_column' => 'post_title', 'hierarchical' => 1,
+		'child_of' => 0, 'order' => 'ASC',
+		'order_by' => 'post_title', 'hierarchical' => 1,
 		'exclude' => array(), 'include' => array(),
 		'meta_key' => '', 'meta_value' => '',
-		'authors' => '', 'parent' => -1, 'exclude_tree' => '',
-		'number' => '', 'offset' => 0,
+		'authors' => '', 'author' => '', 'parent' => -1, 'post_parent' => -1, 'exclude_tree' => '',
+		'numberposts' => '', 'number' => '', 'offset' => 0,
 		'post_type' => 'page', 'post_status' => 'publish',
+		'sort_column' => 'post_title', 'sort_order' => 'ASC',
+		'posts_per_page' => -1, 'nopaging' => true,
 	);
 
 	$r = wp_parse_args( $args, $defaults );
-	extract( $r, EXTR_SKIP );
-	$number = (int) $number;
-	$offset = (int) $offset;
-
-	// Make sure the post type is hierarchical
-	$hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
-	if ( !in_array( $post_type, $hierarchical_post_types ) )
-		return false;
-
-	// Make sure we have a valid post status
-	if ( !in_array($post_status, get_post_stati()) )
-		return false;
-
-	$cache = array();
-	$key = md5( serialize( compact(array_keys($defaults)) ) );
-	if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) {
-		if ( is_array($cache) && isset( $cache[ $key ] ) ) {
-			$pages = apply_filters('get_pages', $cache[ $key ], $r );
-			return $pages;
-		}
-	}
-
-	if ( !is_array($cache) )
-		$cache = array();
-
-	$inclusions = '';
-	if ( !empty($include) ) {
-		$child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include
-		$parent = -1;
-		$exclude = '';
-		$meta_key = '';
-		$meta_value = '';
-		$hierarchical = false;
-		$incpages = wp_parse_id_list( $include );
-		if ( ! empty( $incpages ) ) {
-			foreach ( $incpages as $incpage ) {
-				if (empty($inclusions))
-					$inclusions = $wpdb->prepare(' AND ( ID = %d ', $incpage);
-				else
-					$inclusions .= $wpdb->prepare(' OR ID = %d ', $incpage);
-			}
-		}
-	}
-	if (!empty($inclusions))
-		$inclusions .= ')';
-
-	$exclusions = '';
-	if ( !empty($exclude) ) {
-		$expages = wp_parse_id_list( $exclude );
-		if ( ! empty( $expages ) ) {
-			foreach ( $expages as $expage ) {
-				if (empty($exclusions))
-					$exclusions = $wpdb->prepare(' AND ( ID <> %d ', $expage);
-				else
-					$exclusions .= $wpdb->prepare(' AND ID <> %d ', $expage);
-			}
-		}
-	}
-	if (!empty($exclusions))
-		$exclusions .= ')';
-
-	$author_query = '';
-	if (!empty($authors)) {
-		$post_authors = preg_split('/[\s,]+/',$authors);
-
-		if ( ! empty( $post_authors ) ) {
-			foreach ( $post_authors as $post_author ) {
-				//Do we have an author id or an author login?
-				if ( 0 == intval($post_author) ) {
-					$post_author = get_userdatabylogin($post_author);
-					if ( empty($post_author) )
-						continue;
-					if ( empty($post_author->ID) )
-						continue;
-					$post_author = $post_author->ID;
-				}
-
-				if ( '' == $author_query )
-					$author_query = $wpdb->prepare(' post_author = %d ', $post_author);
-				else
-					$author_query .= $wpdb->prepare(' OR post_author = %d ', $post_author);
-			}
-			if ( '' != $author_query )
-				$author_query = " AND ($author_query)";
-		}
-	}
-
-	$join = '';
-	$where = "$exclusions $inclusions ";
-	if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) {
-		$join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
-
-		// meta_key and meta_value might be slashed
-		$meta_key = stripslashes($meta_key);
-		$meta_value = stripslashes($meta_value);
-		if ( ! empty( $meta_key ) )
-			$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key);
-		if ( ! empty( $meta_value ) )
-			$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value);
-
-	}
-
-	if ( $parent >= 0 )
-		$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
-
-	$where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status = '%s'", $post_type, $post_status );
-
-	$query = "SELECT * FROM $wpdb->posts $join WHERE ($where_post_type) $where ";
-	$query .= $author_query;
-	$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
-
-	if ( !empty($number) )
-		$query .= ' LIMIT ' . $offset . ',' . $number;
-
-	$pages = $wpdb->get_results($query);
-
-	if ( empty($pages) ) {
-		$pages = apply_filters('get_pages', array(), $r);
-		return $pages;
-	}
-
-	// Sanitize before caching so it'll only get done once
-	$num_pages = count($pages);
-	for ($i = 0; $i < $num_pages; $i++) {
-		$pages[$i] = sanitize_post($pages[$i], 'raw');
-	}
-
-	// Update cache.
-	update_page_cache($pages);
-
-	if ( $child_of || $hierarchical )
-		$pages = & get_page_children($child_of, $pages);
-
-	if ( !empty($exclude_tree) ) {
-		$exclude = (int) $exclude_tree;
-		$children = get_page_children($exclude, $pages);
-		$excludes = array();
-		foreach ( $children as $child )
-			$excludes[] = $child->ID;
-		$excludes[] = $exclude;
-		$num_pages = count($pages);
-		for ( $i = 0; $i < $num_pages; $i++ ) {
-			if ( in_array($pages[$i]->ID, $excludes) )
-				unset($pages[$i]);
-		}
-	}
-
-	$cache[ $key ] = $pages;
-	wp_cache_set( 'get_pages', $cache, 'posts' );
-
-	$pages = apply_filters('get_pages', $pages, $r);
-
+	$pages = get_posts( $r );
+	$pages = apply_filters( 'get_pages', $pages, $r );
 	return $pages;
 }
 
diff --git wp-includes/query.php wp-includes/query.php
index fbf6d35..4b49c45 100644
--- wp-includes/query.php
+++ wp-includes/query.php
@@ -2025,7 +2025,7 @@ class WP_Query {
 			$where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)";
 		}
 
-		if ( is_numeric($q['post_parent']) )
+		if ( is_numeric($q['post_parent']) && $q['post_parent'] > 0 )
 			$where .= $wpdb->prepare( " AND $wpdb->posts.post_parent = %d ", $q['post_parent'] );
 
 		if ( $q['page_id'] ) {
@@ -2508,6 +2508,22 @@ class WP_Query {
 			$this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
 			$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
 		}
+		
+		if ( ! empty( $q['child_of'] ) && ! empty( $q['hierarchical'] ) ) {
+			$this->posts = get_page_children( $q['child_of'], $this->posts );
+		}
+		
+		if ( ! empty( $q['exclude_tree'] ) ) {
+			$exclude_tree = (int) $q['exclude_tree'];
+			$excluded_children = get_page_children( $exclude_tree, $this->posts, 'ID' );
+			$excluded_children[] = $exclude_tree;
+			
+			foreach ( $this->posts as $index => $post ) {
+				if ( in_array( $post->ID, $excluded_children ) ) {
+					unset( $this->posts[$index] );
+				}
+			}
+		}
 
 		// Check post status to determine if post should be displayed.
 		if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
@@ -2595,10 +2611,10 @@ class WP_Query {
 			$this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) );
 
 		$this->post_count = count($this->posts);
-
+		
 		// Sanitize before caching so it'll only get done once
-		for ( $i = 0; $i < $this->post_count; $i++ ) {
-			$this->posts[$i] = sanitize_post($this->posts[$i], 'raw');
+		foreach ( $this->posts as $key => $post ) {
+			$this->posts[$key] = sanitize_post( $this->posts[$key], 'raw' );
 		}
 
 		if ( $q['cache_results'] )
@@ -2610,7 +2626,7 @@ class WP_Query {
 
 		return $this->posts;
 	}
-
+	
 	/**
 	 * Set up the next post and iterate current post index.
 	 *
