Changeset 25750 for trunk/src/wp-admin/includes/class-wp-upgrader.php
- Timestamp:
- 10/10/2013 01:31:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r25700 r25750 1300 1300 1301 1301 // In the event of an error, rollback to the previous version 1302 if ( is_wp_error( $result ) && $parsed_args['attempt_rollback'] && $current->packages->rollback ) {1302 if ( is_wp_error( $result ) && $parsed_args['attempt_rollback'] && $current->packages->rollback && ! $parsed_args['do_rollback'] ) { 1303 1303 apply_filters( 'update_feedback', $result ); 1304 1304 apply_filters( 'update_feedback', $this->strings['start_rollback'] ); 1305 1305 1306 $ this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );1307 1308 $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'] );1306 $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) ); 1307 1308 $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], array( 'rollback' => $rollback_result, 'update' => $result ) ); 1309 1309 } 1310 1310 do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ), $result ); … … 1727 1727 // Next, Process any core upgrade 1728 1728 wp_version_check(); // Check for Core updates 1729 $extra_update_stats = array(); 1729 1730 $core_update = find_core_auto_update(); 1730 1731 if ( $core_update ) { 1731 self::upgrade( 'core', $core_update ); 1732 $start_time = time(); 1733 $core_update_result = self::upgrade( 'core', $core_update ); 1732 1734 delete_site_transient( 'update_core' ); 1735 $extra_update_stats['success'] = is_wp_error( $core_update_result ) ? $core_update_result->get_error_code() : true; 1736 if ( is_wp_error( $core_update_result ) && 'rollback_was_required' == $core_update_result->get_error_code() ) { 1737 $rollback_data = $core_update_result->get_error_data(); 1738 $extra_update_stats['success'] = is_wp_error( $rollback_data['update'] ) ? $rollback_data['update']->get_error_code() : $rollback_data['update']; 1739 $extra_update_stats['rollback'] = is_wp_error( $rollback_data['rollback'] ) ? $rollback_data['rollback']->get_error_code() : $rollback_data['rollback']; 1740 } 1741 $extra_update_stats['fs_method'] = $GLOBALS['wp_filesystem']->method; 1742 $extra_update_stats['time_taken'] = ( time() - $start_time ); 1733 1743 } 1734 1744 1735 1745 // Cleanup, and check for any pending translations 1736 wp_version_check( ); // check for Core updates1746 wp_version_check( $extra_update_stats ); // check for Core updates 1737 1747 wp_update_themes(); // Check for Theme updates 1738 1748 wp_update_plugins(); // Check for Plugin updates
Note: See TracChangeset
for help on using the changeset viewer.