Upgrades: Specifically pass the 'version' and 'locale' POST vars through the Core Update FTP credentials form.

This bug was introduced with [30384] / #30245.
Merges [31527] to the 4.1 branch.
Fixes #31378.

Built from https://develop.svn.wordpress.org/branches/4.1@31528


git-svn-id: http://core.svn.wordpress.org/branches/4.1@31509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-02-24 03:24:25 +00:00
parent da742c0489
commit ae731c8312
1 changed files with 2 additions and 2 deletions

View File

@ -390,14 +390,14 @@ function do_core_upgrade( $reinstall = false ) {
<h2><?php _e('Update WordPress'); ?></h2> <h2><?php _e('Update WordPress'); ?></h2>
<?php <?php
if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH, array(), $allow_relaxed_file_ownership ) ) ) { if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership ) ) ) {
echo '</div>'; echo '</div>';
return; return;
} }
if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) { if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) {
// Failed to connect, Error and request again // Failed to connect, Error and request again
request_filesystem_credentials( $url, '', true, ABSPATH, array(), $allow_relaxed_file_ownership ); request_filesystem_credentials( $url, '', true, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership );
echo '</div>'; echo '</div>';
return; return;
} }