Make WordPress Core

Changeset 8759


Ignore:
Timestamp:
08/28/2008 07:09:46 AM (16 years ago)
Author:
ryan
Message:

Upgrade db with remote post during core update. see #5560

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r8645 r8759  
    200200    // Might have to do upgrade in a separate step.
    201201    apply_filters('update_feedback', __('Upgrading database'));
    202     // Get new db version
    203     global $wp_db_version;
    204     require (ABSPATH . WPINC . '/version.php');
    205     // Upgrade db
    206     define('WP_INSTALLING', true);
    207     require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    208     wp_upgrade();
     202    $db_upgrade_url = admin_url('upgrade.php?step=upgrade_db');
     203    wp_remote_post($db_upgrade_url, array('timeout' => 60));
    209204
    210205    // Remove working directory
  • trunk/wp-admin/upgrade.php

    r8645 r8759  
    2121require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    2222
    23 if (isset($_GET['step']))
    24     $step = (int) $_GET['step'];
     23if ( isset($_GET['step']) )
     24    $step = $_GET['step'];
    2525else
    2626    $step = 0;
     27
     28// Do it.  No output.
     29if ( 'upgrade_db' === $step ) {
     30    wp_upgrade();
     31    die('0');
     32}
     33
     34$step = (int) $step;
     35
    2736@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    2837?>
Note: See TracChangeset for help on using the changeset viewer.