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
This commit is contained in:
parent
521078cf17
commit
a160441c81
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue