Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 25139)
+++ src/wp-includes/post.php	(revision )
@@ -2715,6 +2715,24 @@
 	if ( empty($post_type) )
 		$post_type = 'post';
 
+    if ( isset($post_parent) )
+        $post_parent = (int) $post_parent;
+    else
+        $post_parent = 0;
+
+    // Check the post_parent to see if it will cause a hierarchy loop
+    $post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );
+
+    // Check to see if the post parent is unpublished. If so, set this post status to match.
+	if ( isset($post_parent) && $post_parent ) {
+		$post_parent_object = get_post( $post_parent );
+		if ( 'publish' !== $post_parent_object->post_status ) {
+			$post_status = $post_parent_object->post_status;
+		}
+		// Set this post's password if its parent had one.
+		if ( !empty($post_parent_object->post_password) )
+			$post_password = $post_parent_object->post_password;
+    }
 	if ( empty($post_status) )
 		$post_status = 'draft';
 
@@ -2810,14 +2828,6 @@
 
 	if ( ! isset($pinged) )
 		$pinged = '';
-
-	if ( isset($post_parent) )
-		$post_parent = (int) $post_parent;
-	else
-		$post_parent = 0;
-
-	// Check the post_parent to see if it will cause a hierarchy loop
-	$post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );
 
 	if ( isset($menu_order) )
 		$menu_order = (int) $menu_order;
Index: src/wp-admin/js/post.js
===================================================================
--- src/wp-admin/js/post.js	(revision 25139)
+++ src/wp-admin/js/post.js	(revision )
@@ -515,7 +515,7 @@
 			if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
 				publishOn = postL10n.publishOnFuture;
 				$('#publish').val( postL10n.schedule );
-			} else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) {
+			} else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' && $('#unpublished_parent').val() != 1 ) {
 				publishOn = postL10n.publishOn;
 				$('#publish').val( postL10n.publish );
 			} else {
Index: src/wp-includes/post-template.php
===================================================================
--- src/wp-includes/post-template.php	(revision 25139)
+++ src/wp-includes/post-template.php	(revision )
@@ -784,6 +784,12 @@
 	);
 
 	$r = wp_parse_args( $args, $defaults );
+	$r = apply_filters( 'wp_dropdown_pages_args', $r );
+	if ( is_admin() ) {
+		// revert to default (public) post_status on the Reading Settings page
+		if ( 'options-reading' == get_current_screen()->base )
+			unset( $r['post_status'] );
+	}
 	extract( $r, EXTR_SKIP );
 
 	$pages = get_pages($r);
@@ -829,6 +835,7 @@
 	);
 
 	$r = wp_parse_args( $args, $defaults );
+	$r = apply_filters( 'wp_list_pages_args', $r );
 	extract( $r, EXTR_SKIP );
 
 	$output = '';
Index: src/wp-includes/js/autosave.js
===================================================================
--- src/wp-includes/js/autosave.js	(revision 25139)
+++ src/wp-includes/js/autosave.js	(revision )
@@ -176,6 +176,9 @@
 
 			if ( res.responses[0].data ) // update autosave message
 				jQuery('.autosave-message').text( res.responses[0].data );
+
+			if ( res.responses[0].supplemental.parent_status ) // update hidden unpublished_parent field
+				jQuery('#unpublished_parent').val( res.responses[0].supplemental.parent_status );
 		}
 	}
 
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 25139)
+++ src/wp-admin/includes/ajax-actions.php	(revision )
@@ -1082,6 +1082,13 @@
 				$id = $post->ID;
 		}
 
+		$parent_status = get_post_status( $post->post_parent );
+		$parent_password = get_post_field( 'post_password', $post->post_parent );
+		if ( $parent_status !== 'publish' )
+		$supplemental['replace-unpublished_parent'] = 1;
+		elseif ( !empty($parent_password) )
+			$supplemental['replace-unpublished_parent'] = 2;
+
 		if ( ! is_wp_error($id) ) {
 			/* translators: draft saved date format, see http://php.net/date */
 			$draft_saved_date_format = __('g:i:s a');
Index: src/wp-admin/includes/meta-boxes.php
===================================================================
--- src/wp-admin/includes/meta-boxes.php	(revision 25139)
+++ src/wp-admin/includes/meta-boxes.php	(revision )
@@ -15,6 +15,18 @@
 	$post_type = $post->post_type;
 	$post_type_object = get_post_type_object($post_type);
 	$can_publish = current_user_can($post_type_object->cap->publish_posts);
+	$unpublished_parent = 0;
+	if ( isset( $post->post_parent ) && $post->post_parent ) {
+		$parent_status = get_post_status( $post->post_parent );
+		$parent_password = get_post_field( 'post_password', $post->post_parent );
+		if ( 'publish' !== $parent_status ) {
+			$unpublished_parent = 1;
+			$post->post_status = $parent_status;
+		}
+		elseif ( !empty( $parent_password ) ) {
+			$unpublished_parent = 2;
+		}
+    }
 ?>
 <div class="submitbox" id="submitpost">
 
@@ -23,6 +35,8 @@
 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
 <div style="display:none;">
 <?php submit_button( __( 'Save' ), 'button', 'save' ); ?>
+<input type="hidden" name="unpublished_parent" id="unpublished_parent" value="<?php echo
+esc_attr($unpublished_parent); ?>" />
 </div>
 
 <div id="minor-publishing-actions">
@@ -124,22 +138,27 @@
 }
 
 echo esc_html( $visibility_trans ); ?></span>
-<?php if ( $can_publish ) { ?>
+<?php if ( 1 == $unpublished_parent ) { ?>
+<p><?php printf('To publish this page, you must first <a href="%s">publish its parent page</a>.', get_edit_post_link( $post->post_parent ) ); ?></p>
+<?php } elseif ( $can_publish ) { ?>
 <a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
 
 <div id="post-visibility-select" class="hide-if-js">
+	<?php if ( 2 == $unpublished_parent ) { ?>
+		<p><?php printf('This is a child of <a href="%s">a password-protected page</a>. To remove this page\'s password, you must first remove its parent\'s.', get_edit_post_link( $post->post_parent ) ); ?></p>
+	<?php } ?>
 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
 <?php if ($post_type == 'post'): ?>
 <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> />
 <?php endif; ?>
 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
-<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
+<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> <?php if ( 2 == $unpublished_parent ) echo 'disabled'; ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
 <?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
 <?php endif; ?>
 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
 <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="20" /><br /></span>
-<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
+<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> <?php if ( 2 == $unpublished_parent ) echo 'disabled'; ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
 
 <p>
  <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>
@@ -220,7 +239,7 @@
 <div id="publishing-action">
 <span class="spinner"></span>
 <?php
-if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
+if ( !$unpublished_parent && !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
 	if ( $can_publish ) :
 		if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
 		<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
