From ea7d0de7233f3e3c9aa838f36a2e262c14a164a2 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 22 Oct 2013 17:19:48 +0000 Subject: [PATCH] Updates: Disable maintenance mode once we've finished copying files, to minimize disruption. props dd32. fixes #25655. git-svn-id: https://develop.svn.wordpress.org/trunk@25866 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update-core.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index 6481162a2d..6e49c98d50 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/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 );