WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/15/2013 11:02:28 PM (6 years ago)
Author:
nacin
Message:

Significantly simplify get_core_checksums(), as the caching and chunking was causing too much grief.

Make sure we only do our pre-flight is_writable check when the file exists.

see #18201. see #22704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r25787 r25801  
    12521252        $wp_dir = trailingslashit($wp_filesystem->abspath());
    12531253
    1254         // Pre-cache the checksums for the versions we care about
    1255         get_core_checksums( array( $wp_version, $current->version ) );
    1256 
    12571254        $partial = true;
    12581255        if ( $parsed_args['do_rollback'] )
     
    13851382
    13861383    function check_files() {
    1387         global $wp_version;
    1388 
    1389         $checksums = get_core_checksums( $wp_version );
    1390 
    1391         if ( empty( $checksums[ $wp_version ] ) || ! is_array( $checksums[ $wp_version ] ) )
     1384        global $wp_version, $wp_local_package;
     1385
     1386        $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
     1387
     1388        if ( ! is_array( $checksums ) )
    13921389            return false;
    13931390
    1394         foreach ( $checksums[ $wp_version ] as $file => $checksum ) {
     1391        foreach ( $checksums as $file => $checksum ) {
    13951392            // Skip files which get updated
    13961393            if ( 'wp-content' == substr( $file, 0, 10 ) )
Note: See TracChangeset for help on using the changeset viewer.