Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php	(revision 25429)
+++ wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -1486,7 +1486,18 @@
 		wp_update_themes();  // Check for Theme updates
 		wp_update_plugins(); // Check for Plugin updates
 
-		self::send_email();
+		/**
+		 * Filter whether to email an update summary to the site administrator.
+		 *
+		 * @since 3.7.0
+		 *
+		 * @param bool                       Whether or not email should be sent to administrator. Default true.
+		 * @param bool|array $core_update    An array of core update data, false otherwise.
+		 * @param object     $theme_updates  Object containing theme update properties.
+		 * @param object     $plugin_updates Object containing plugin update properties.
+		 */
+		if ( apply_filters( 'enable_auto_upgrade_email', true, $core_update, $theme_updates, $plugin_updates ) )
+			self::send_email();
 
 		// Clear the lock
 		delete_site_option( $lock_name );
@@ -1568,7 +1579,7 @@
 		wp_mail(
 			get_site_option( 'admin_email' ),
 			$subject,
-			implode( "\n", $body ) 
+			implode( "\n", $body )
 		);
 	}
 
Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 25429)
+++ wp-admin/includes/post.php	(working copy)
@@ -1052,7 +1052,7 @@
 	$post->post_name = $original_name;
 	unset($post->filter);
 
-	return $permalink;
+	return apply_filters( 'get_sample_permalink', $permalink, $title, $name, $id, $post );
 }
 
 /**
Index: wp-admin/media-new.php
===================================================================
--- wp-admin/media-new.php	(revision 25429)
+++ wp-admin/media-new.php	(working copy)
@@ -31,10 +31,8 @@
 		// Upload File button was clicked
 		$id = media_handle_upload( 'async-upload', $post_id );
 		if ( is_wp_error( $id ) )
-			$location .= '?message=3';
+			wp_die( $id );
 	}
-	wp_redirect( admin_url( $location ) );
-	exit;
 }
 
 $title = __('Upload New Media');
