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
This commit is contained in:
dd32 2010-01-17 07:38:27 +00:00
parent 97c8150bbd
commit 32ac56eaa8
1 changed files with 2 additions and 3 deletions

View File

@ -82,9 +82,8 @@ switch ( $step ) :
case 1: case 1:
wp_upgrade(); wp_upgrade();
$backto = empty($_GET['backto']) ? '' : $_GET['backto'] ; $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
$backto = stripslashes( urldecode( $backto ) ); $backto = esc_url_raw( $backto );
$backto = esc_url_raw( $backto );
$backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
if( $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'" ) ) { 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}'" ); $wpdb->query( "UPDATE {$wpdb->blog_versions} SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" );