Ensure that the Update API's are always using a non-modified $wp_version. Props nacin. Fixes #14384

git-svn-id: http://svn.automattic.com/wordpress/trunk@17619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2011-04-07 10:04:45 +00:00
parent 197e081e19
commit 619d4d2dba
1 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,8 @@ function wp_version_check() {
if ( defined('WP_INSTALLING') )
return;
global $wp_version, $wpdb, $wp_local_package;
global $wpdb, $wp_local_package;
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
$php_version = phpversion();
$current = get_site_transient( 'update_core' );
@ -119,7 +120,7 @@ function wp_version_check() {
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
*/
function wp_update_plugins() {
global $wp_version;
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
if ( defined('WP_INSTALLING') )
return false;
@ -203,8 +204,8 @@ function wp_update_plugins() {
*
* @return mixed Returns null if update is unsupported. Returns false if check is too soon.
*/
function wp_update_themes( ) {
global $wp_version;
function wp_update_themes() {
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
if ( defined( 'WP_INSTALLING' ) )
return false;
@ -290,7 +291,7 @@ function wp_update_themes( ) {
}
function _maybe_update_core() {
global $wp_version;
include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version
$current = get_site_transient( 'update_core' );