Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 7890)
+++ wp-includes/post.php	(working copy)
@@ -408,10 +408,12 @@
 		'order' => 'DESC', 'include' => '',
 		'exclude' => '', 'meta_key' => '',
 		'meta_value' =>'', 'post_type' => 'post',
-		'post_status' => 'publish', 'post_parent' => 0
+		'post_parent' => 0
 	);
 
 	$r = wp_parse_args( $args, $defaults );
+	if ( empty( $r['post_status'] ) )
+		$r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish';
 	if ( ! empty($r['numberposts']) )
 		$r['posts_per_page'] = $r['numberposts'];
 	if ( ! empty($r['category']) )
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 7890)
+++ wp-includes/media.php	(working copy)
@@ -349,7 +349,8 @@
 	}
 
 	extract(shortcode_atts(array(
-		'orderby'    => 'menu_order ASC, ID ASC',
+		'order'      => 'ASC',
+		'orderby'    => 'menu_order ID',
 		'id'         => $post->ID,
 		'itemtag'    => 'dl',
 		'icontag'    => 'dt',
@@ -359,7 +360,7 @@
 	), $attr));
 
 	$id = intval($id);
-	$attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby={$orderby}");
+	$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
 
 	if ( empty($attachments) )
 		return '';
@@ -433,7 +434,7 @@
 function adjacent_image_link($prev = true) {
 	global $post;
 	$post = get_post($post);
-	$attachments = array_values(get_children("post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC"));
+	$attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
 
 	foreach ( $attachments as $k => $attachment )
 		if ( $attachment->ID == $post->ID )
