Make WordPress Core

Ticket #29425: 29425.diff

File 29425.diff, 1.4 KB (added by dd32, 10 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    12521252
    12531253                if ( empty( $language_updates ) ) {
    12541254                        $this->skin->header();
    12551255                        $this->skin->before();
    12561256                        $this->skin->set_result( true );
    12571257                        $this->skin->feedback( 'up_to_date' );
    12581258                        $this->skin->after();
    12591259                        $this->skin->bulk_footer();
    12601260                        $this->skin->footer();
    12611261                        return true;
    12621262                }
    12631263
    12641264                if ( 'upgrader_process_complete' == current_filter() )
    12651265                        $this->skin->feedback( 'starting_upgrade' );
    12661266
    1267                 // Remove any existing package checks and then set the new one for translations, #WP29230.
     1267                // Remove any existing upgrade filters from the plugin/theme upgraders #WP29425 & #WP29230
     1268                remove_all_filters( 'upgrader_pre_install' );
     1269                remove_all_filters( 'upgrader_clear_destination' );
     1270                remove_all_filterS( 'upgrader_post_install' );
    12681271                remove_all_filters( 'upgrader_source_selection' );
     1272
    12691273                add_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10, 2 );
    12701274
    12711275                $this->skin->header();
    12721276
    12731277                // Connect to the Filesystem first.
    12741278                $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_LANG_DIR ) );
    12751279                if ( ! $res ) {
    12761280                        $this->skin->footer();
    12771281                        return false;
    12781282                }
    12791283
    12801284                $results = array();
    12811285
    12821286                $this->update_count = count( $language_updates );
    12831287                $this->update_current = 0;