From: Edward Z. Yang Date: Wed, 21 May 2014 23:17:33 +0000 (-0700) Subject: WordPress 3.8.3 X-Git-Tag: wordpress-3.8.3 X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/commitdiff_plain/ceb5a929e00123b4e224977c6b5a149f6431b250?hp=a349837896628462bf8c9bdc27d1477a10fe03eb WordPress 3.8.3 Signed-off-by: Edward Z. Yang --- diff --git a/readme.html b/readme.html index 35172352..dbcd9a6d 100644 --- a/readme.html +++ b/readme.html @@ -9,7 +9,7 @@

WordPress -
Version 3.8.2 +
Version 3.8.3

Semantic Personal Publishing Platform

diff --git a/wp-admin/about.php b/wp-admin/about.php index aa8a1069..ce9c8022 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -39,7 +39,11 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
-

+

+

Version %1$s addressed %2$s bug.', + 'Version %1$s addressed %2$s bugs.', 2 ), '3.8.3', number_format_i18n( 2 ) ); ?> + the release notes.' ), 'http://codex.wordpress.org/Version_3.8.3' ); ?> +

Version %1$s addressed some security issues and fixed %2$s bug.', 'Version %1$s addressed some security issues and fixed %2$s bugs.', 9 ), '3.8.2', number_format_i18n( 9 ) ); ?> the release notes.' ), 'http://codex.wordpress.org/Version_3.8.2' ); ?> diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index bd624979..11aa9cf8 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -203,10 +203,6 @@ function edit_post( $post_data = null ) { _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) ); } - if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) { - $post_data['post_status'] = 'draft'; - } - if ( isset($post_data['visibility']) ) { switch ( $post_data['visibility'] ) { case 'public' : @@ -227,6 +223,10 @@ function edit_post( $post_data = null ) { if ( is_wp_error($post_data) ) wp_die( $post_data->get_error_message() ); + if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) { + $post_data['post_status'] = 'draft'; + } + // Post Formats if ( isset( $post_data['post_format'] ) ) set_post_format( $post_ID, $post_data['post_format'] ); @@ -411,7 +411,12 @@ function bulk_edit_posts( $post_data = null ) { } $updated = $skipped = $locked = array(); + $shared_post_data = $post_data; + foreach ( $post_IDs as $post_ID ) { + // Start with fresh post data with each iteration. + $post_data = $shared_post_data; + $post_type_object = get_post_type_object( get_post_type( $post_ID ) ); if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) { @@ -460,13 +465,13 @@ function bulk_edit_posts( $post_data = null ) { $post_data['ID'] = $post_ID; $post_data['post_ID'] = $post_ID; - $translated_post_data = _wp_translate_postdata( true, $post_data ); - if ( is_wp_error( $translated_post_data ) ) { + $post_data = _wp_translate_postdata( true, $post_data ); + if ( is_wp_error( $post_data ) ) { $skipped[] = $post_ID; continue; } - $updated[] = wp_update_post( $translated_post_data ); + $updated[] = wp_update_post( $post_data ); if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) { if ( 'sticky' == $post_data['sticky'] ) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 1622cab9..ac8e522f 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -411,6 +411,9 @@ function upgrade_all() { if ( $wp_current_db_version < 26691 ) upgrade_380(); + if ( $wp_current_db_version < 26692 ) + upgrade_383(); + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -1251,6 +1254,36 @@ function upgrade_380() { deactivate_plugins( array( 'mp6/mp6.php' ), true ); } } + +/** + * Execute changes made in WordPress 3.8.3. + * + * @since 3.8.3 + */ +function upgrade_383() { + global $wp_current_db_version, $wpdb; + if ( $wp_current_db_version < 26692 ) { + // Find all lost Quick Draft auto-drafts and promote them to proper drafts. + $posts = $wpdb->get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_type = 'post' + AND post_status = 'auto-draft' AND post_date >= '2014-04-08 00:00:00'" ); + + foreach ( $posts as $post ) { + // A regular auto-draft should never have content as that would mean it should have been promoted. + // If an auto-draft has content, it's from Quick Draft and it should be recovered. + if ( '' === $post->post_content ) { + // If it does not have content, we must evaluate whether the title should be recovered. + if ( 'Auto Draft' === $post->post_title || __( 'Auto Draft' ) === $post->post_title ) { + // This a plain old auto draft. Ignore it. + continue; + } + } + + $wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post->ID ) ); + clean_post_cache( $post->ID ); + } + } +} + /** * Execute network level changes * diff --git a/wp-includes/version.php b/wp-includes/version.php index b2496327..15ae453c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,14 +4,14 @@ * * @global string $wp_version */ -$wp_version = '3.8.2'; +$wp_version = '3.8.3'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 26691; +$wp_db_version = 26692; /** * Holds the TinyMCE version