Changeset 22226
- Timestamp:
- 10/14/2012 02:14:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update-core.php
r22054 r22226 620 620 $required_mysql_version = '5.0'; 621 621 $wp_version = '3.4'; 622 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from 623 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // a dash in the version indicates a Development release 622 624 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); 623 625 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) … … 684 686 // Copy New bundled plugins & themes 685 687 // This gives us the ability to install new plugins & themes bundled with future versions of WordPress whilst avoiding the re-install upon upgrade issue. 688 // $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated 686 689 if ( !is_wp_error($result) && ( ! defined('CORE_UPGRADE_SKIP_NEW_BUNDLED') || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) { 687 $old_version = $GLOBALS['wp_version']; // $wp_version in local scope == new version688 690 foreach ( (array) $_new_bundled_files as $file => $introduced_version ) { 689 // If $introduced version is greater than what the site was previously running690 if ( version_compare($introduced_version, $old_version, '>') ) {691 // If a $development_build or if $introduced version is greater than what the site was previously running 692 if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { 691 693 $directory = ('/' == $file[ strlen($file)-1 ]); 692 694 list($type, $filename) = explode('/', $file, 2); … … 700 702 701 703 if ( ! $directory ) { 702 if ( $wp_filesystem->exists($dest . $filename) )704 if ( ! $development_build && $wp_filesystem->exists( $dest . $filename ) ) 703 705 continue; 704 706 … … 706 708 $result = new WP_Error('copy_failed', __('Could not copy file.'), $dest . $filename); 707 709 } else { 708 if ( $wp_filesystem->is_dir($dest . $filename) )710 if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) ) 709 711 continue; 710 712
Note: See TracChangeset
for help on using the changeset viewer.