~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to wp-admin/includes/update-core.php

  • Committer: Package Import Robot
  • Author(s): Craig Small
  • Date: 2014-01-24 22:20:08 UTC
  • mfrom: (1.2.31)
  • Revision ID: package-import@ubuntu.com-20140124222008-wgyk0hvmhjkubf9i
Tags: 3.8.1+dfsg-1
* New upstream release.
* Depend on either mysql or mariadb client Closes: #732914

Show diffs side-by-side

added added

removed removed

Lines of Context:
562
562
'wp-admin/js/cat.js',
563
563
'wp-admin/js/cat.min.js',
564
564
'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js',
 
565
// 3.8
 
566
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif',
 
567
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif',
 
568
'wp-includes/js/thickbox/tb-close-2x.png',
 
569
'wp-includes/js/thickbox/tb-close.png',
 
570
'wp-includes/images/wpmini-blue-2x.png',
 
571
'wp-includes/images/wpmini-blue.png',
 
572
'wp-admin/css/colors-fresh.css',
 
573
'wp-admin/css/colors-classic.css',
 
574
'wp-admin/css/colors-fresh.min.css',
 
575
'wp-admin/css/colors-classic.min.css',
 
576
'wp-admin/js/about.min.js',
 
577
'wp-admin/js/about.js',
 
578
'wp-admin/images/arrows-dark-vs-2x.png',
 
579
'wp-admin/images/wp-logo-vs.png',
 
580
'wp-admin/images/arrows-dark-vs.png',
 
581
'wp-admin/images/wp-logo.png',
 
582
'wp-admin/images/arrows-pr.png',
 
583
'wp-admin/images/arrows-dark.png',
 
584
'wp-admin/images/press-this.png',
 
585
'wp-admin/images/press-this-2x.png',
 
586
'wp-admin/images/arrows-vs-2x.png',
 
587
'wp-admin/images/welcome-icons.png',
 
588
'wp-admin/images/wp-logo-2x.png',
 
589
'wp-admin/images/stars-rtl-2x.png',
 
590
'wp-admin/images/arrows-dark-2x.png',
 
591
'wp-admin/images/arrows-pr-2x.png',
 
592
'wp-admin/images/menu-shadow-rtl.png',
 
593
'wp-admin/images/arrows-vs.png',
 
594
'wp-admin/images/about-search-2x.png',
 
595
'wp-admin/images/bubble_bg-rtl-2x.gif',
 
596
'wp-admin/images/wp-badge-2x.png',
 
597
'wp-admin/images/wordpress-logo-2x.png',
 
598
'wp-admin/images/bubble_bg-rtl.gif',
 
599
'wp-admin/images/wp-badge.png',
 
600
'wp-admin/images/menu-shadow.png',
 
601
'wp-admin/images/about-globe-2x.png',
 
602
'wp-admin/images/welcome-icons-2x.png',
 
603
'wp-admin/images/stars-rtl.png',
 
604
'wp-admin/images/wp-logo-vs-2x.png',
 
605
'wp-admin/images/about-updates-2x.png',
565
606
);
566
607
 
567
608
/**
589
630
        'themes/twentyeleven/'   => '3.2',
590
631
        'themes/twentytwelve/'   => '3.5',
591
632
        'themes/twentythirteen/' => '3.6',
 
633
        'themes/twentyfourteen/' => '3.8',
592
634
);
593
635
 
594
636
/**
697
739
 
698
740
        // Check to see which files don't really need updating - only available for 3.7 and higher
699
741
        if ( function_exists( 'get_core_checksums' ) ) {
 
742
                // Find the local version of the working directory
 
743
                $working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro;
 
744
 
700
745
                $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
701
746
                if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) )
702
747
                        $checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2
706
751
                                        continue;
707
752
                                if ( ! file_exists( ABSPATH . $file ) )
708
753
                                        continue;
 
754
                                if ( ! file_exists( $working_dir_local . $file ) )
 
755
                                        continue;
709
756
                                if ( md5_file( ABSPATH . $file ) === $checksum )
710
757
                                        $skip[] = $file;
711
758
                                else
752
799
        $failed = array();
753
800
        if ( isset( $checksums ) && is_array( $checksums ) ) {
754
801
                foreach ( $checksums as $file => $checksum ) {
755
 
                        if ( 0 === strpos( $file, 'wp-content' ) )
756
 
                                continue;
757
 
 
 
802
                        if ( 'wp-content' == substr( $file, 0, 10 ) )
 
803
                                continue;
 
804
                        if ( ! file_exists( $working_dir_local . $file ) )
 
805
                                continue;
758
806
                        if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum )
759
807
                                $skip[] = $file;
760
808
                        else
765
813
        // Some files didn't copy properly
766
814
        if ( ! empty( $failed ) ) {
767
815
                $total_size = 0;
768
 
                // Find the local version of the working directory
769
 
                $working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro;
770
816
                foreach ( $failed as $file ) {
771
817
                        if ( file_exists( $working_dir_local . $file ) )
772
818
                                $total_size += filesize( $working_dir_local . $file );
882
928
        $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
883
929
        wp_remote_post($db_upgrade_url, array('timeout' => 60));
884
930
 
 
931
        // Clear the cache to prevent an update_option() from saving a stale db_version to the cache
 
932
        wp_cache_flush();
 
933
        // (Not all cache backends listen to 'flush')
 
934
        wp_cache_delete( 'alloptions', 'options' );
 
935
 
885
936
        // Remove working directory
886
937
        $wp_filesystem->delete($from, true);
887
938