PHP Cross Reference of WordPress Subversion HEAD

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]

title

Body

[close]

/wp-admin/ -> upgrade.php (source)

   1  <?php
   2  define('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  
   6  require('../wp-config.php');
   7  timer_start();
   8  require_once (ABSPATH . 'wp-admin/includes/upgrade.php');
   9  
  10  if (isset($_GET['step']))
  11      $step = (int) $_GET['step'];
  12  else
  13      $step = 0;
  14  @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
  15  ?>
  16  <!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(); ?>>
  18  <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      <?php wp_admin_css( 'css/install' ); ?>
  22  </head>
  23  <body>
  24  <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
  25  
  26  <?php if ( get_option('db_version') == $wp_db_version ) : ?>
  27  
  28  <h2><?php _e('No Upgrade Required'); ?></h2>
  29  <p><?php _e('Your WordPress database is already up-to-date!'); ?></p>
  30  <h2 class="step"><a href="<?php echo get_option('home'); ?>/"><?php _e('Continue &raquo;'); ?></a></h2>
  31  
  32  <?php else :
  33  switch($step) :
  34      case 0:
  35          $goback = clean_url(stripslashes(wp_get_referer()));
  36  ?>
  37  <h2><?php _e('Database Upgrade Required'); ?></h2>
  38  <p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p>
  39  <p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p>
  40  <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
  41  <?php
  42          break;
  43      case 1:
  44          wp_upgrade();
  45  
  46          if ( empty( $_GET['backto'] ) )
  47              $backto = __get_option('home') . '/';
  48          else
  49              $backto = clean_url(stripslashes($_GET['backto']));
  50  ?>
  51  <h2><?php _e('Upgrade Complete'); ?></h2>
  52      <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p>
  53      <h2 class="step"><a href="<?php echo $backto; ?>"><?php _e('Continue &raquo;'); ?></a></h2>
  54  
  55  <!--
  56  <pre>
  57  <?php printf(__('%s queries'), $wpdb->num_queries); ?>
  58  
  59  <?php printf(__('%s seconds'), timer_stop(0)); ?>
  60  </pre>
  61  -->
  62  
  63  <?php
  64          break;
  65  endswitch;
  66  endif;
  67  ?>
  68  </body>
  69  </html>


Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs Cross-referenced by PHPXref 0.6 and RedAlt