Make WordPress Core

Ticket #18201: 18201-no_partial.patch

File 18201-no_partial.patch, 2.4 KB (added by TobiasBg, 10 years ago)

Don't use inverted naming for booleans

  • src/wp-admin/includes/class-wp-upgrader.php

     
    12541254                // Pre-cache the checksums for the versions we care about
    12551255                get_core_checksums( array( $wp_version, $current->version ) );
    12561256
    1257                 $no_partial = false;
     1257                $partial = true;
    12581258                if ( $parsed_args['do_rollback'] )
    1259                         $no_partial = true;
     1259                        $partial = false;
    12601260                elseif ( $parsed_args['pre_check_md5'] && ! $this->check_files() )
    1261                         $no_partial = true;
     1261                        $partial = false;
    12621262
    12631263                // If partial update is returned from the API, use that, unless we're doing a reinstall.
    12641264                // If we cross the new_bundled version number, then use the new_bundled zip.
     
    12661266                // If the API returns a no_content zip, go with it. Finally, default to the full zip.
    12671267                if ( $parsed_args['do_rollback'] && $current->packages->rollback )
    12681268                        $to_download = 'rollback';
    1269                 elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && ! $no_partial )
     1269                elseif ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version && $partial )
    12701270                        $to_download = 'partial';
    12711271                elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
    12721272                        && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) )
     
    16401640                                                $item->language
    16411641                                        );
    16421642                                }
    1643                                
     1643
    16441644                                break;
    16451645                }
    16461646
     
    16881688                        return;
    16891689
    16901690                // Don't automatically run these thins, as we'll handle it ourselves
    1691                 remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20, 3 ); 
    1692                 remove_action( 'upgrader_process_complete', 'wp_version_check' ); 
    1693                 remove_action( 'upgrader_process_complete', 'wp_update_plugins' ); 
    1694                 remove_action( 'upgrader_process_complete', 'wp_update_themes' ); 
     1691                remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20, 3 );
     1692                remove_action( 'upgrader_process_complete', 'wp_version_check' );
     1693                remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
     1694                remove_action( 'upgrader_process_complete', 'wp_update_themes' );
    16951695
    16961696                // Next, Plugins
    16971697                wp_update_plugins(); // Check for Plugin updates