WordPress.org

Make WordPress Core

Changeset 27882


Ignore:
Timestamp:
04/01/2014 03:08:47 AM (6 years ago)
Author:
nacin
Message:

When checking filesystem permissions for core updates, only check the permissions of the files which we need to alter.

Merges [26014] from 3.8 to the 3.7 branch.

fixes #25771.

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src/wp-admin/includes/update-core.php

    r25916 r27882  
    698698    // Check to see which files don't really need updating - only available for 3.7 and higher
    699699    if ( function_exists( 'get_core_checksums' ) ) {
     700        // Find the local version of the working directory
     701        $working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro;
     702
    700703        $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
    701704        if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) )
     
    706709                    continue;
    707710                if ( ! file_exists( ABSPATH . $file ) )
     711                    continue;
     712                if ( ! file_exists( $working_dir_local . $file ) )
    708713                    continue;
    709714                if ( md5_file( ABSPATH . $file ) === $checksum )
     
    753758    if ( isset( $checksums ) && is_array( $checksums ) ) {
    754759        foreach ( $checksums as $file => $checksum ) {
    755             if ( 0 === strpos( $file, 'wp-content' ) )
     760            if ( 'wp-content' == substr( $file, 0, 10 ) )
    756761                continue;
    757 
     762            if ( ! file_exists( $working_dir_local . $file ) )
     763                continue;
    758764            if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum )
    759765                $skip[] = $file;
     
    766772    if ( ! empty( $failed ) ) {
    767773        $total_size = 0;
    768         // Find the local version of the working directory
    769         $working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro;
    770774        foreach ( $failed as $file ) {
    771775            if ( file_exists( $working_dir_local . $file ) )
Note: See TracChangeset for help on using the changeset viewer.