From 4aa0ca0aab4c8cecca8dae2970866b806d26544a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 1 Apr 2014 03:29:10 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-upgrader.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 3b265f30c2..72314eae56 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -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