From 32ac56eaa8628a5c13df3e493972f03ae1225c6d Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 17 Jan 2010 07:38:27 +0000 Subject: [PATCH] Always set a goback link on upgrade page. Props filosofo. Fixes #10986 git-svn-id: http://svn.automattic.com/wordpress/trunk@12744 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index 9e40bf9fe..5e5f8f061 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -82,9 +82,8 @@ switch ( $step ) : case 1: wp_upgrade(); - $backto = empty($_GET['backto']) ? '' : $_GET['backto'] ; - $backto = stripslashes( urldecode( $backto ) ); - $backto = esc_url_raw( $backto ); + $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; + $backto = esc_url_raw( $backto ); $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); if( $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'" ) ) { $wpdb->query( "UPDATE {$wpdb->blog_versions} SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" );