WordPress.org

Make WordPress Core

Changeset 9085


Ignore:
Timestamp:
10/05/2008 05:45:34 AM (12 years ago)
Author:
ryan
Message:

Don't die with 503 if WP_INSTALLING. Don't load plugins if WP_INSTALLING. Remove old files and working dir before exiting maintenance mode. see #5560

Location:
trunk
Files:
2 edited

Legend:

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

    r9053 r9085  
    200200    }
    201201
    202     // Might have to do upgrade in a separate step.
     202    // Upgrade DB with separate request
    203203    apply_filters('update_feedback', __('Upgrading database'));
    204204    $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
    205205    wp_remote_post($db_upgrade_url, array('timeout' => 60));
    206 
    207     // Remove working directory
    208     $wp_filesystem->delete($from, true);
    209 
    210     // Remove maintenance file, we're done.
    211     $wp_filesystem->delete($maintenance_file);
    212206
    213207    // Remove old files
     
    219213    }
    220214
     215    // Remove working directory
     216    $wp_filesystem->delete($from, true);
     217
    221218    // Force refresh of update information
    222219    delete_option('update_core');
     220
     221    // Remove maintenance file, we're done.
     222    $wp_filesystem->delete($maintenance_file);
    223223}
    224224
  • trunk/wp-settings.php

    r8772 r9085  
    108108    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
    109109
    110 if ( file_exists(ABSPATH . '.maintenance') ) {
     110if ( file_exists(ABSPATH . '.maintenance') && !defined('WP_INSTALLING') ) {
    111111    if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
    112112        require_once( WP_CONTENT_DIR . '/maintenance.php' );
     
    446446}
    447447
    448 if ( get_option('active_plugins') ) {
     448if ( get_option('active_plugins') && !defined('WP_INSTALLING') ) {
    449449    $current_plugins = get_option('active_plugins');
    450450    if ( is_array($current_plugins) ) {
Note: See TracChangeset for help on using the changeset viewer.