Remove old files before upgrading DB. see #5560
git-svn-id: http://svn.automattic.com/wordpress/trunk@9086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c209f15b5c
commit
9d9607e6d6
|
@ -199,11 +199,6 @@ function update_core($from, $to) {
|
|||
return $result;
|
||||
}
|
||||
|
||||
// Upgrade DB with separate request
|
||||
apply_filters('update_feedback', __('Upgrading database'));
|
||||
$db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
|
||||
wp_remote_post($db_upgrade_url, array('timeout' => 60));
|
||||
|
||||
// Remove old files
|
||||
foreach ( $_old_files as $old_file ) {
|
||||
$old_file = $to . $old_file;
|
||||
|
@ -212,6 +207,11 @@ function update_core($from, $to) {
|
|||
$wp_filesystem->delete($old_file, true);
|
||||
}
|
||||
|
||||
// Upgrade DB with separate request
|
||||
apply_filters('update_feedback', __('Upgrading database'));
|
||||
$db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
|
||||
wp_remote_post($db_upgrade_url, array('timeout' => 60));
|
||||
|
||||
// Remove working directory
|
||||
$wp_filesystem->delete($from, true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue