Extra check for partial updates: Make sure the API response matches the current version of WP. see #10611.
git-svn-id: https://develop.svn.wordpress.org/trunk@18227 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c6876acffa
commit
e304611748
@ -867,7 +867,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
}
|
||||
|
||||
function upgrade($current) {
|
||||
global $wp_filesystem;
|
||||
global $wp_filesystem, $wp_version;
|
||||
|
||||
$this->init();
|
||||
$this->upgrade_strings();
|
||||
@ -889,7 +889,7 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
// If we cross the new_bundled version number, then use the new_bundled zip.
|
||||
// Don't though if the constant is set to skip bundled items.
|
||||
// If the API returns a no_content zip, go with it. Finally, default to the full zip.
|
||||
if ( $current->packages->partial && 'reinstall' != $current->response )
|
||||
if ( $current->packages->partial && 'reinstall' != $current->response && $wp_version == $current->partial_version )
|
||||
$to_download = 'partial';
|
||||
elseif ( $current->packages->new_bundled && version_compare( $wp_version, $current->new_bundled, '<' )
|
||||
&& ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) )
|
||||
|
@ -91,8 +91,8 @@ function wp_version_check() {
|
||||
else
|
||||
$offer[ $offer_key ] = esc_html( $value );
|
||||
}
|
||||
$offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download',
|
||||
'locale', 'packages', 'current', 'php_version', 'mysql_version', 'new_bundled' ), '' ) );
|
||||
$offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale',
|
||||
'packages', 'current', 'php_version', 'mysql_version', 'new_bundled', 'partial_version' ), '' ) );
|
||||
}
|
||||
|
||||
$updates = new stdClass();
|
||||
|
Loading…
Reference in New Issue
Block a user