Core Upgrader success statistics: Pass the version of WordPress we're upgrading from, as well as the version being upgraded to.

Merges [26016] and [26017] from 3.8 to the 3.7 branch.

fixes #25772.

Built from https://develop.svn.wordpress.org/branches/3.7@27883


git-svn-id: http://core.svn.wordpress.org/branches/3.7@27714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-01 03:29:10 +00:00
parent 8930937bf0
commit 4aa0ca0aab

View File

@ -1314,7 +1314,9 @@ class Core_Upgrader extends WP_Upgrader {
}
function upgrade( $current, $args = array() ) {
global $wp_filesystem, $wp_version;
global $wp_filesystem;
include ABSPATH . WPINC . '/version.php'; // $wp_version;
$start_time = time();
@ -1422,6 +1424,7 @@ class Core_Upgrader extends WP_Upgrader {
'fs_method' => $wp_filesystem->method,
'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
'time_taken' => time() - $start_time,
'reported' => $wp_version,
'attempted' => $current->version,
);
@ -1900,7 +1903,7 @@ class WP_Automatic_Updater {
// if the filesystem is unavailable, false is returned.
if ( false === $upgrade_result ) {
$upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
$upgrade_result = new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
}
// Core doesn't output this, so lets append it so we don't get confused