From fefaa807e9e9e327952c43451f5bc335eb6b81ec Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 29 Sep 2013 22:59:46 +0000 Subject: [PATCH] Automatic Updates: Skip doing the sanity checking MD5 before deciding if we should use a partial build or not, This change means we always use a partial build for automatic updates. See #22704 git-svn-id: https://develop.svn.wordpress.org/trunk@25647 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-upgrader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index 0f0ce8eca7..9f99cfc11a 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -1230,6 +1230,7 @@ class Core_Upgrader extends WP_Upgrader { global $wp_filesystem, $wp_version; $defaults = array( + 'pre_check_md5' => true, ); $parsed_args = wp_parse_args( $args, $defaults ); @@ -1250,7 +1251,7 @@ class Core_Upgrader extends WP_Upgrader { get_core_checksums( array( $wp_version, $current->version ) ); $no_partial = false; - if ( ! $this->check_files() ) + if ( $parsed_args['pre_check_md5'] && ! $this->check_files() ) $no_partial = true; // If partial update is returned from the API, use that, unless we're doing a reinstall. @@ -1625,6 +1626,7 @@ class WP_Automatic_Upgrader { // Boom, This sites about to get a whole new splash of paint! $upgrade_result = $upgrader->upgrade( $item, array( 'clear_update_cache' => false, + 'pre_check_md5' => false, /* always use partial builds if possible for core updates */ ) ); // Core doesn't output this, so lets append it so we don't get confused