]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/update-core.php
Wizard 2.8.2-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / update-core.php
index 2e4781b2fe9a0efdbdd49685ed8bbdb374089083..5abee7573a120e82e8a896aad543afbd24d42f0a 100644 (file)
@@ -161,11 +161,7 @@ $_old_files = array(
 'wp-images/smilies',
 'wp-images/wp-small.png',
 'wp-images/wpminilogo.png',
-'wp.php',
-'wp-content/themes/default/attachment.php',
-'wp-content/themes/default/images/kubrickbg.jpg',
-'wp-content/plugins/markdown.php',
-'wp-content/plugins/textile1.php',
+'wp.php'
 );
 
 /**
@@ -233,7 +229,7 @@ function update_core($from, $to) {
        $result = copy_dir($from . '/wordpress', $to);
        if ( is_wp_error($result) ) {
                $wp_filesystem->delete($maintenance_file);
-               //$wp_filesystem->delete($working_dir, true); //TODO: Uncomment? This DOES mean that the new files are available in the upgrade folder if it fails.
+               $wp_filesystem->delete($from, true);
                return $result;
        }
 
@@ -254,7 +250,10 @@ function update_core($from, $to) {
        $wp_filesystem->delete($from, true);
 
        // Force refresh of update information
-       delete_option('update_core');
+       if ( function_exists('delete_transient') )
+               delete_transient('update_core');
+       else
+               delete_option('update_core');
 
        // Remove maintenance file, we're done.
        $wp_filesystem->delete($maintenance_file);