Make WordPress Core


Ignore:
Timestamp:
09/27/2013 11:20:08 PM (11 years ago)
Author:
nacin
Message:

Changes to automatic background updates in preparation for Beta 1.

  • Show a notice for beta testers on update-core.php explaining the status of their install. Three possibilities: auto updates are enabled, auto updates are disabled because the install doesn't support SSL HTTP requests, and auto updates are disabled because it is a VCS checkout.
  • Improve the output of the email, for maximum debugging potential. Failures are clearly labeled and the email leads testers to the support forums and Trac.
  • Try to create wp-content/languages in the upgrader if it doesn't exist. Our mkdir isn't recursive, so trying to create wp-content/languages/plugins could fail.
  • Abstract out version control checkout determination into a public method. The filter is now auto_upgrade_is_vcs_checkout, still subject to change.

see #22704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r25616 r25633  
    154154    }
    155155
     156    // This is temporary, for the WordPress 3.7 beta period.
     157    if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) {
     158        require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
     159        $ssl_support = wp_http_supports( 'ssl' );
     160        $should_auto_update = WP_Automatic_Upgrader::should_auto_update( 'core', $updates[0], ABSPATH );
     161        if ( $ssl_support && $should_auto_update ) {
     162            echo '<div class="updated inline"><p><strong>BETA TESTERS: This install will receive daily auto updates to future beta versions.</strong>';
     163            if ( get_locale() !== 'en_US' )
     164                echo ' Translations of importers and default themes will also be updated.';
     165            echo '</p><p>You will receive an email with debugging output after each update. If something goes wrong, please <a href="http://wordpress.org/support/forum/alphabeta">post in the support forums</a> or <a href="https://core.trac.wordpress.org/">open a bug report</a>.</div>';
     166        } elseif ( ! $ssl_support ) {
     167            echo '<div class="error inline"><p><strong>BETA TESTERS:</strong> Your server does not support HTTP requests over SSL. This install will not receive auto updates.</p></div>';
     168        } elseif ( WP_Automatic_Upgrader::is_vcs_checkout( ABSPATH ) ) {
     169            echo '<div class="error inline"><p><strong>BETA TESTERS:</strong> This install uses version control (SVN or Git) and thus will not receive auto updates. Try a separate install of WordPress with the <a href="http://wordpress.org/plugins/wordpress-beta-tester/">Beta Tester</a> plugin set to bleeding edge.</p></div>';
     170        }
     171    }
     172
    156173    echo '<ul class="core-updates">';
    157174    $alternate = true;
Note: See TracChangeset for help on using the changeset viewer.