Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r4259 r3420  
    11<?php
    22define('WP_INSTALLING', true);
    3 if (!file_exists('../wp-config.php'))
    4     die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
    5 
     3if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config-sample.php with the proper database connection information and renamed it to wp-config.php.");
    64require('../wp-config.php');
    75timer_start();
    86require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
    97
    10 if (isset($_GET['step']))
    11     $step = $_GET['step'];
    12 else
    13     $step = 0;
    14 @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
     8$step = $_GET['step'];
     9if (!$step) $step = 0;
     10header( 'Content-Type: text/html; charset=utf-8' );
    1511?>
    1612<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    17 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
     13<html xmlns="http://www.w3.org/1999/xhtml">
    1814<head>
    19     <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    20     <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title>
    21     <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install.css?version=<?php bloginfo('version'); ?>" type="text/css" />
    22     <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
    23     <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
    24     <?php endif; ?>
     15    <title>WordPress &rsaquo; Upgrade</title>
     16    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     17    <style media="screen" type="text/css">
     18    <!--
     19    html {
     20        background: #eee;
     21    }
     22    body {
     23        background: #fff;
     24        color: #000;
     25        font-family: Georgia, "Times New Roman", Times, serif;
     26        margin-left: 20%;
     27        margin-right: 20%;
     28        padding: .2em 2em;
     29    }
     30   
     31    h1 {
     32        color: #006;
     33        font-size: 18px;
     34        font-weight: lighter;
     35    }
     36   
     37    h2 {
     38        font-size: 16px;
     39    }
     40   
     41    p, li, dt {
     42        line-height: 140%;
     43        padding-bottom: 2px;
     44    }
     45
     46    ul, ol {
     47        padding: 5px 5px 5px 20px;
     48    }
     49    #logo {
     50        margin-bottom: 2em;
     51    }
     52.step a, .step input {
     53    font-size: 2em;
     54}
     55.step, th {
     56    text-align: right;
     57}
     58#footer {
     59text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic;
     60}
     61    -->
     62    </style>
    2563</head>
    2664<body>
     
    2866<?php
    2967switch($step) {
     68
    3069    case 0:
    31         $goback = wp_specialchars(wp_get_referer());
     70    $goback = wp_specialchars($_SERVER['HTTP_REFERER'], 1);
    3271?>
    3372<p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p>
    34 <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
     73    <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
    3574<?php
    36         break;
     75    break;
     76   
    3777    case 1:
    38         wp_upgrade();
     78    wp_cache_flush();
     79    make_db_current_silent();
     80    upgrade_all();
     81    wp_cache_flush();
    3982
    40         if ( empty( $_GET['backto'] ) )
    41             $backto = __get_option('home');
    42         else
    43             $backto = wp_specialchars( $_GET['backto'] , 1 );
     83    if ( empty( $_GET['backto'] ) )
     84        $backto = __get_option('home');
     85    else
     86        $backto = wp_specialchars( $_GET['backto'] , 1 );
    4487?>
    4588<h2><?php _e('Step 1'); ?></h2>
     
    5598
    5699<?php
    57         break;
     100    break;
    58101}
    59102?>
Note: See TracChangeset for help on using the changeset viewer.