Changes in trunk/wp-admin/upgrade.php [4259:3420]
- File:
-
- 1 edited
-
trunk/wp-admin/upgrade.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade.php
r4259 r3420 1 1 <?php 2 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 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."); 6 4 require('../wp-config.php'); 7 5 timer_start(); 8 6 require_once(ABSPATH . '/wp-admin/upgrade-functions.php'); 9 7 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']; 9 if (!$step) $step = 0; 10 header( 'Content-Type: text/html; charset=utf-8' ); 15 11 ?> 16 12 <!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"> 18 14 <head> 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; ?> 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> 25 63 </head> 26 64 <body> … … 28 66 <?php 29 67 switch($step) { 68 30 69 case 0: 31 $goback = wp_specialchars(wp_get_referer());70 $goback = wp_specialchars($_SERVER['HTTP_REFERER'], 1); 32 71 ?> 33 72 <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&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress »'); ?></a></h2>73 <h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress »'); ?></a></h2> 35 74 <?php 36 break; 75 break; 76 37 77 case 1: 38 wp_upgrade(); 78 wp_cache_flush(); 79 make_db_current_silent(); 80 upgrade_all(); 81 wp_cache_flush(); 39 82 40 if ( empty( $_GET['backto'] ) )41 $backto = __get_option('home');42 else43 $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 ); 44 87 ?> 45 88 <h2><?php _e('Step 1'); ?></h2> … … 55 98 56 99 <?php 57 break;100 break; 58 101 } 59 102 ?>
Note: See TracChangeset
for help on using the changeset viewer.