wip
This commit is contained in:
@@ -403,7 +403,6 @@ class WP_Upgrader {
|
||||
* Flattens the results of WP_Filesystem_Base::dirlist() for iterating over.
|
||||
*
|
||||
* @since 4.9.0
|
||||
* @access protected
|
||||
*
|
||||
* @param array $nested_files Array of files as returned by WP_Filesystem_Base::dirlist().
|
||||
* @param string $path Relative path to prepend to child nodes. Optional.
|
||||
@@ -1023,18 +1022,21 @@ class WP_Upgrader {
|
||||
}
|
||||
|
||||
$file = $wp_filesystem->abspath() . '.maintenance';
|
||||
|
||||
if ( $enable ) {
|
||||
if ( ! wp_doing_cron() ) {
|
||||
$this->skin->feedback( 'maintenance_start' );
|
||||
}
|
||||
|
||||
// Create maintenance file to signal that we are upgrading.
|
||||
$maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
|
||||
$wp_filesystem->delete( $file );
|
||||
$wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
|
||||
} elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
|
||||
} elseif ( $wp_filesystem->exists( $file ) ) {
|
||||
if ( ! wp_doing_cron() ) {
|
||||
$this->skin->feedback( 'maintenance_end' );
|
||||
}
|
||||
|
||||
$wp_filesystem->delete( $file );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user