Ticket #32503: 32503.diff
File 32503.diff, 2.0 KB (added by , 9 years ago) |
---|
-
src/wp-admin/network/site-info.php
65 65 } 66 66 update_blog_details( $id, $blog_data ); 67 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 ); 68 $new_details = get_blog_details( $id, false ); 69 $blog_address = esc_url_raw( $new_details->domain . $new_details->path ); 70 if ( get_option( 'home' ) != $blog_address ) { 71 update_option( 'home', $blog_address ); 72 } 73 74 if ( isset( $_POST['update_site_url'] ) && $_POST['update_site_url'] == 'update' ) { 71 75 if ( get_option( 'siteurl' ) != $blog_address ) { 72 76 update_option( 'siteurl', $blog_address ); 73 77 } 74 if ( get_option( 'home' ) != $blog_address ) {75 update_option( 'home', $blog_address );76 }77 78 } 78 79 79 80 restore_current_blog(); … … 143 144 <th scope="row"><label for="path"><?php _e( 'Path' ) ?></label></th> 144 145 <td> 145 146 <input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br /> 146 <input type="checkbox" name="update_ home_url" id="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <label for="update_home_url"><?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>147 <input type="checkbox" name="update_site_url" id="update_site_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) ) echo 'checked="checked"'; ?> /> <label for="update_site_url"><?php _e( 'Update <code>siteurl</code> as well.' ); ?></label> 147 148 </td> 148 149 <?php 149 150 restore_current_blog();