diff --git wp-admin/network/site-info.php wp-admin/network/site-info.php
index bcc71f9..8071b25 100644
|
|
|
if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) { |
| 49 | 49 | |
| 50 | 50 | switch_to_blog( $id ); |
| 51 | 51 | |
| | 52 | $url_parts = parse_url( 'http://' . $_POST['blog']['url'] ); |
| | 53 | unset( $_POST['blog']['url'] ); |
| | 54 | |
| | 55 | $_POST['blog']['domain'] = $url_parts['host']; |
| | 56 | $_POST['blog']['path'] = $url_parts['path']; |
| | 57 | |
| 52 | 58 | if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { |
| 53 | 59 | $blog_address = get_blogaddress_by_domain( $_POST['blog']['domain'], $_POST['blog']['path'] ); |
| | 60 | |
| 54 | 61 | if ( get_option( 'siteurl' ) != $blog_address ) |
| 55 | 62 | update_option( 'siteurl', $blog_address ); |
| 56 | 63 | |
| … |
… |
if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) { |
| 74 | 81 | update_blog_details( $id, $blog_data ); |
| 75 | 82 | |
| 76 | 83 | restore_current_blog(); |
| | 84 | |
| 77 | 85 | wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-info.php') ); |
| 78 | 86 | exit; |
| 79 | 87 | } |
| … |
… |
if ( ! empty( $messages ) ) { |
| 122 | 130 | <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> |
| 123 | 131 | <table class="form-table"> |
| 124 | 132 | <tr class="form-field form-required"> |
| 125 | | <th scope="row"><?php _e( 'Domain' ) ?></th> |
| | 133 | <th scope="row"><?php _e( 'URL' ) ?></th> |
| | 134 | <td> |
| 126 | 135 | <?php |
| 127 | 136 | $protocol = is_ssl() ? 'https://' : 'http://'; |
| | 137 | |
| 128 | 138 | if ( $is_main_site ) { ?> |
| 129 | | <td><code><?php echo $protocol; echo esc_attr( $details->domain ) ?></code></td> |
| 130 | | <?php } else { ?> |
| 131 | | <td><?php echo $protocol; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td> |
| 132 | | <?php } ?> |
| 133 | | </tr> |
| 134 | | <tr class="form-field form-required"> |
| 135 | | <th scope="row"><?php _e( 'Path' ) ?></th> |
| 136 | | <?php if ( $is_main_site ) { ?> |
| 137 | | <td><code><?php echo esc_attr( $details->path ) ?></code></td> |
| 138 | | <?php |
| 139 | | } else { |
| | 139 | <code><?php echo $protocol; echo esc_html( $site_url_no_http ); ?></code> |
| | 140 | <?php } else { |
| 140 | 141 | switch_to_blog( $id ); |
| 141 | 142 | ?> |
| 142 | | <td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" size="40" style='margin-bottom:5px;' /> |
| 143 | | <br /><input type="checkbox" style="width:20px;" name="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"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></td> |
| | 143 | |
| | 144 | <?php echo $protocol; ?><input name="blog[url]" type="text" id="url" value="<?php echo esc_attr( $site_url_no_http ) ?>" /> |
| | 145 | |
| | 146 | <br /><input type="checkbox" style="width:20px;" name="update_home_url" value="update" <?php checked( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></td> |
| 144 | 147 | <?php |
| 145 | 148 | restore_current_blog(); |
| 146 | 149 | } ?> |
| | 150 | </td> |
| 147 | 151 | </tr> |
| 148 | 152 | <tr class="form-field"> |
| 149 | 153 | <th scope="row"><?php _ex( 'Registered', 'site' ) ?></th> |