summaryrefslogtreecommitdiffstats
path: root/wp-admin/upgrade.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-15 13:19:12 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-15 13:19:12 +0000
commit8752f7651d737da0dbe86065e708347a58b40d61 (patch)
treeac80c1eb849760d123d729ffb33fb8a9dc1742db /wp-admin/upgrade.php
parent982f28611561556403f1c1004ad41f3253205e0e (diff)
downloadwordpress-mu-8752f7651d737da0dbe86065e708347a58b40d61.tar.gz
wordpress-mu-8752f7651d737da0dbe86065e708347a58b40d61.tar.xz
wordpress-mu-8752f7651d737da0dbe86065e708347a58b40d61.zip
WP Merge to rev 4887
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@888 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/upgrade.php')
-rw-r--r--wp-admin/upgrade.php29
1 files changed, 20 insertions, 9 deletions
diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php
index 3e1b740..7cd81be 100644
--- a/wp-admin/upgrade.php
+++ b/wp-admin/upgrade.php
@@ -8,7 +8,7 @@ timer_start();
require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
if (isset($_GET['step']))
- $step = $_GET['step'];
+ $step = (int) $_GET['step'];
else
$step = 0;
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
@@ -25,12 +25,21 @@ else
</head>
<body>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
-<?php
-switch($step) {
+
+<?php if ( get_option('db_version') == $wp_db_version ) : ?>
+
+<h2><?php _e('No Upgrade Required'); ?></h2>
+<p><?php _e('Your WordPress database is already up-to-date!'); ?></p>
+<h2 class="step"><a href="<?php echo get_option('home'); ?>/"><?php _e('Continue &raquo;'); ?></a></h2>
+
+<?php else :
+switch($step) :
case 0:
$goback = attribute_escape(stripslashes(wp_get_referer()));
-?>
-<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>
+?>
+<h2><?php _e('Database Upgrade Required'); ?></h2>
+<p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p>
+<p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p>
<h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
<?php
break;
@@ -38,7 +47,7 @@ switch($step) {
wp_upgrade();
if ( empty( $_GET['backto'] ) )
- $backto = __get_option('home');
+ $backto = __get_option('home') . '/';
else
$backto = attribute_escape(stripslashes($_GET['backto']));
if( $wpdb->get_row( "SELECT blog_id FROM wp_blog_versions WHERE blog_id = '{$wpdb->blogid}'" ) ) {
@@ -47,8 +56,9 @@ switch($step) {
$wpdb->query( "INSERT INTO wp_blog_versions ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" );
}
?>
-<h2><?php _e('Step 1'); ?></h2>
- <p><?php printf(__("There's actually only one step. So if you see this, you're done. <a href='%s'>Have fun</a>!"), $backto); ?></p>
+<h2><?php _e('Upgrade Complete'); ?></h2>
+ <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p>
+ <h2 class="step"><a href="<?php echo $backto; ?>"><?php _e('Continue &raquo;'); ?></a></h2>
<!--
<pre>
@@ -60,7 +70,8 @@ switch($step) {
<?php
break;
-}
+endswitch;
+endif;
?>
</body>
</html>