Better redirect back.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-01-10 03:06:48 +00:00
parent a905e79b9f
commit e9678c577b
1 changed files with 8 additions and 2 deletions

View File

@ -67,9 +67,10 @@ text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: it
switch($step) { switch($step) {
case 0: case 0:
$goback = wp_specialchars($_SERVER['HTTP_REFERER'], 1);
?> ?>
<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> <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 class="step"><a href="upgrade.php?step=1"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
<?php <?php
break; break;
@ -78,9 +79,14 @@ switch($step) {
make_db_current_silent(); make_db_current_silent();
upgrade_all(); upgrade_all();
wp_cache_flush(); wp_cache_flush();
if ( empty( $_GET['backto'] ) )
$backto = __get_option('home');
else
$backto = wp_specialchars( $_GET['backto'] , 1 );
?> ?>
<h2><?php _e('Step 1'); ?></h2> <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>!"), __get_option('home') . '/'); ?></p> <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>
<!-- <!--
<pre> <pre>