Language Pack Upgrader: Remove ALL pre-existing filters before performing a translation update these filters may act in an unexpected way during the upgrade process.

See #29230. Fixes #29425.

Built from https://develop.svn.wordpress.org/trunk@29685


git-svn-id: http://core.svn.wordpress.org/trunk@29460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2014-09-03 05:38:14 +00:00
parent 208c1f65d2
commit e8f6320bb4
1 changed files with 5 additions and 1 deletions

View File

@ -1264,8 +1264,12 @@ class Language_Pack_Upgrader extends WP_Upgrader {
if ( 'upgrader_process_complete' == current_filter() )
$this->skin->feedback( 'starting_upgrade' );
// Remove any existing package checks and then set the new one for translations, #WP29230.
// Remove any existing upgrade filters from the plugin/theme upgraders #WP29425 & #WP29230
remove_all_filters( 'upgrader_pre_install' );
remove_all_filters( 'upgrader_clear_destination' );
remove_all_filterS( 'upgrader_post_install' );
remove_all_filters( 'upgrader_source_selection' );
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10, 2 );
$this->skin->header();