Remove old files before upgrading DB. see #5560

git-svn-id: https://develop.svn.wordpress.org/trunk@9086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-05 06:00:24 +00:00
parent 9da6ee40f4
commit a7d565a94a
1 changed files with 5 additions and 5 deletions

View File

@ -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);