Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickebates committed Apr 15, 2014
2 parents cbdd57a + 8c520f0 commit f138e2e
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Project Nami
===============

###Version: `0.9.12`###
###Version: `0.9.13`###

###Description:###

Expand Down
6 changes: 5 additions & 1 deletion wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
</h2>

<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 2 ); ?></h3>
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 3 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.', 2 ), '3.8.3', number_format_i18n( 2 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.3' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 9 ), '3.8.2', number_format_i18n( 9 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.2' ); ?>
Expand Down
19 changes: 12 additions & 7 deletions wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' :
Expand All @@ -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'] );
Expand Down Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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'] )
Expand Down
33 changes: 33 additions & 0 deletions wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ function upgrade_all() {

populate_options();

if ( $wp_current_db_version < 26692 )
upgrade_383();

maybe_disable_link_manager();

maybe_disable_automattic_widgets();
Expand Down Expand Up @@ -381,6 +384,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
*
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/pn-version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

$pn_version = '0.9.12';
$pn_version = '0.9.13';

?>
4 changes: 2 additions & 2 deletions wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f138e2e

Please sign in to comment.