diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php index 395bf71a31..9c6ecb71bb 100644 --- a/wp-admin/ms-edit.php +++ b/wp-admin/ms-edit.php @@ -207,11 +207,12 @@ switch ( $_GET['action'] ) { } if ( $_POST['update_home_url'] == 'update' ) { - if ( get_option( 'siteurl' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ) - update_option( 'siteurl', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ); + $blog_address = get_blogaddress_by_domain($_POST['blog']['domain'], $_POST['blog']['path']); + if ( get_option( 'siteurl' ) != $blog_address ) + update_option( 'siteurl', $blog_address); - if ( get_option( 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ) - update_option( 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ); + if ( get_option( 'home' ) != $blog_address ) + update_option( 'home', $blog_address ); } $wp_rewrite->flush_rules(); diff --git a/wp-admin/ms-options.php b/wp-admin/ms-options.php index df4c176054..80f525b742 100644 --- a/wp-admin/ms-options.php +++ b/wp-admin/ms-options.php @@ -38,7 +38,7 @@ if (isset($_GET['updated'])) {