Changeset 4259 for trunk/wp-admin/upgrade.php
- Timestamp:
- 09/28/2006 05:35:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade.php
r3918 r4259 1 1 <?php 2 2 define('WP_INSTALLING', true); 3 if (!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."); 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 4 6 require('../wp-config.php'); 5 7 timer_start(); 6 8 require_once(ABSPATH . '/wp-admin/upgrade-functions.php'); 7 9 8 $step = $_GET['step']; 9 if (!$step) $step = 0; 10 header( 'Content-Type: text/html; charset=utf-8' ); 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')); 11 15 ?> 12 16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 13 <html xmlns="http://www.w3.org/1999/xhtml" >17 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 14 18 <head> 15 <title>WordPress › 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 { 59 text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic; 60 } 61 --> 62 </style> 19 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 20 <title><?php _e('WordPress › 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; ?> 63 25 </head> 64 26 <body> … … 66 28 <?php 67 29 switch($step) { 68 69 30 case 0: 70 $goback = wp_specialchars(wp_get_referer());31 $goback = wp_specialchars(wp_get_referer()); 71 32 ?> 72 33 <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> 73 34 <h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress »'); ?></a></h2> 74 35 <?php 75 break; 36 break; 37 case 1: 38 wp_upgrade(); 76 39 77 case 1: 78 wp_upgrade(); 79 80 if ( empty( $_GET['backto'] ) ) 81 $backto = __get_option('home'); 82 else 83 $backto = wp_specialchars( $_GET['backto'] , 1 ); 40 if ( empty( $_GET['backto'] ) ) 41 $backto = __get_option('home'); 42 else 43 $backto = wp_specialchars( $_GET['backto'] , 1 ); 84 44 ?> 85 45 <h2><?php _e('Step 1'); ?></h2> … … 95 55 96 56 <?php 97 break;57 break; 98 58 } 99 59 ?>
Note: See TracChangeset
for help on using the changeset viewer.