mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Upgrade/Install: Revert a temporary conditional for testing the Rollbacks feature project.
This will be readded in 6.2-alpha after a 6.1 branch is created. Follow-up to [53578]. See #56057. git-svn-id: https://develop.svn.wordpress.org/trunk@54484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d6f9c7d0bb
commit
394ab0c97f
@ -594,23 +594,7 @@ class WP_Upgrader {
|
||||
}
|
||||
|
||||
// Copy new version of item into place.
|
||||
if ( class_exists( 'Rollback_Update_Failure\WP_Upgrader' )
|
||||
&& function_exists( '\Rollback_Update_Failure\move_dir' )
|
||||
) {
|
||||
/*
|
||||
* If the {@link https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure}
|
||||
* feature plugin is installed, use the move_dir() function from there for better performance.
|
||||
* Instead of copying a directory from one location to another, it uses the rename() PHP function
|
||||
* to speed up the process. If the renaming failed, it falls back to copy_dir().
|
||||
*
|
||||
* This condition aims to facilitate broader testing of the Rollbacks (temp backups) feature project.
|
||||
* It is temporary, until the plugin is merged into core.
|
||||
*/
|
||||
$result = \Rollback_Update_Failure\move_dir( $source, $remote_destination );
|
||||
} else {
|
||||
$result = copy_dir( $source, $remote_destination );
|
||||
}
|
||||
|
||||
$result = copy_dir( $source, $remote_destination );
|
||||
if ( is_wp_error( $result ) ) {
|
||||
if ( $args['clear_working'] ) {
|
||||
$wp_filesystem->delete( $remote_source, true );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user