Make WordPress Core


Ignore:
Timestamp:
04/17/2009 08:00:48 AM (16 years ago)
Author:
markjaquith
Message:

elbow room for upgrade.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade.php

    r10985 r10986  
    1313 * @var bool
    1414 */
    15 define('WP_INSTALLING', true);
     15define( 'WP_INSTALLING', true );
    1616
    1717/** Load WordPress Bootstrap */
    18 require('../wp-load.php');
     18require( '../wp-load.php' );
    1919
    2020timer_start();
    21 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
     21require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    2222
    23 if ( isset($_GET['step']) )
     23if ( isset( $_GET['step'] ) )
    2424    $step = $_GET['step'];
    2525else
     
    2929if ( 'upgrade_db' === $step ) {
    3030    wp_upgrade();
    31     die('0');
     31    die( '0' );
    3232}
    3333
    3434$step = (int) $step;
    3535
    36 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
     36@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    3737?>
    3838<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3939<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    4040<head>
    41     <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    42     <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title>
     41    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
     42    <title><?php _e( 'WordPress &rsaquo; Upgrade' ); ?></title>
    4343    <?php wp_admin_css( 'install', true ); ?>
    4444</head>
     
    4646<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
    4747
    48 <?php if ( get_option('db_version') == $wp_db_version || !is_blog_installed()) : ?>
     48<?php if ( get_option( 'db_version' ) == $wp_db_version || !is_blog_installed() ) : ?>
    4949
    50 <h2><?php _e('No Upgrade Required'); ?></h2>
    51 <p><?php _e('Your WordPress database is already up-to-date!'); ?></p>
    52 <p class="step"><a class="button" href="<?php echo get_option('home'); ?>/"><?php _e('Continue'); ?></a></p>
     50<h2><?php _e( 'No Upgrade Required' ); ?></h2>
     51<p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p>
     52<p class="step"><a class="button" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
    5353
    5454<?php else :
    55 switch($step) :
     55switch ( $step ) :
    5656    case 0:
    57         $goback = stripslashes(wp_get_referer());
    58         $goback = clean_url($goback, null, 'url');
    59         $goback = urlencode($goback);
     57        $goback = stripslashes( wp_get_referer() );
     58        $goback = clean_url( $goback, null, 'url' );
     59        $goback = urlencode( $goback );
    6060?>
    61 <h2><?php _e('Database Upgrade Required'); ?></h2>
    62 <p><?php _e('WordPress has been updated! Before we send you on your way, we have to upgrade your database to the newest version.'); ?></p>
    63 <p><?php _e('The upgrade process may take a little while, so please be patient.'); ?></p>
    64 <p class="step"><a class="button" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress Database'); ?></a></p>
     61<h2><?php _e( 'Database Upgrade Required' ); ?></h2>
     62<p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to upgrade your database to the newest version.' ); ?></p>
     63<p><?php _e( 'The upgrade process may take a little while, so please be patient.' ); ?></p>
     64<p class="step"><a class="button" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Upgrade WordPress Database' ); ?></a></p>
    6565<?php
    6666        break;
     
    6969
    7070        if ( empty( $_GET['backto'] ) )
    71             $backto = __get_option('home') . '/';
     71            $backto = __get_option( 'home' ) . '/';
    7272        else {
    73             $backto = stripslashes(urldecode($_GET['backto']));
    74             $backto = clean_url($backto, null, 'url');
     73            $backto = stripslashes( urldecode( $_GET['backto'] ) );
     74            $backto = clean_url( $backto, null, 'url' );
    7575        }
    7676?>
    77 <h2><?php _e('Upgrade Complete'); ?></h2>
    78     <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p>
    79     <p class="step"><a class="button" href="<?php echo $backto; ?>"><?php _e('Continue'); ?></a></p>
     77<h2><?php _e( 'Upgrade Complete' ); ?></h2>
     78    <p><?php _e( 'Your WordPress database has been successfully upgraded!' ); ?></p>
     79    <p class="step"><a class="button" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
    8080
    8181<!--
    8282<pre>
    83 <?php printf(__('%s queries'), $wpdb->num_queries); ?>
     83<?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
    8484
    85 <?php printf(__('%s seconds'), timer_stop(0)); ?>
     85<?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
    8686</pre>
    8787-->
Note: See TracChangeset for help on using the changeset viewer.