Ticket #30417: 30417.1.diff
| File 30417.1.diff, 1.3 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/network/site-info.php
50 50 51 51 switch_to_blog( $id ); 52 52 53 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) {54 $blog_address = esc_url_raw( $_POST['blog']['domain'] . $_POST['blog']['path'] );55 if ( get_option( 'siteurl' ) != $blog_address )56 update_option( 'siteurl', $blog_address );57 58 if ( get_option( 'home' ) != $blog_address )59 update_option( 'home', $blog_address );60 }61 62 53 // Rewrite rules can't be flushed during switch to blog. 63 54 delete_option( 'rewrite_rules' ); 64 55 … … 74 65 } 75 66 update_blog_details( $id, $blog_data ); 76 67 68 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 69 $new_details = get_blog_details( $id, false ); 70 $blog_address = esc_url_raw( $new_details->domain . $new_details->path ); 71 if ( get_option( 'siteurl' ) != $blog_address ) { 72 update_option( 'siteurl', $blog_address ); 73 } 74 if ( get_option( 'home' ) != $blog_address ) { 75 update_option( 'home', $blog_address ); 76 } 77 } 78 77 79 restore_current_blog(); 78 80 wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-info.php') ); 79 81 exit;