From a160441c8116418113130a460f38857014b81fba Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 22 Oct 2013 17:20:10 +0000 Subject: [PATCH] Updates: Disable maintenance mode once we've finished copying files, to minimize disruption. props dd32. fixes #25655. Built from https://develop.svn.wordpress.org/trunk@25866 git-svn-id: http://core.svn.wordpress.org/trunk@25778 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update-core.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 6481162a2d..6e49c98d50 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -806,6 +806,10 @@ function update_core($from, $to) { } } + apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); + // Remove maintenance file, we're done with potential site-breaking changes + $wp_filesystem->delete( $maintenance_file ); + // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve. if ( '3.5' == $old_wp_version ) { if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) { @@ -860,7 +864,6 @@ function update_core($from, $to) { // Handle $result error from the above blocks if ( is_wp_error($result) ) { - $wp_filesystem->delete($maintenance_file); $wp_filesystem->delete($from, true); return $result; } @@ -887,10 +890,6 @@ function update_core($from, $to) { else delete_option('update_core'); - apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); - // Remove maintenance file, we're done. - $wp_filesystem->delete($maintenance_file); - // If we made it this far: do_action( '_core_updated_successfully', $wp_version );