Ticket #22383: 22383.5.diff
File 22383.5.diff, 2.3 KB (added by , 9 years ago) |
---|
-
src/wp-admin/network/site-info.php
68 68 // On the network's main site, don't allow the domain or path to change. 69 69 $blog_data['domain'] = $details->domain; 70 70 $blog_data['path'] = $details->path; 71 } else if ( is_subdomain_install() ){72 // All parts of a URL can be updated for a subdomain configuration. We first71 } else { 72 // For any other site, the scheme, domain, and path can all be changed. We first 73 73 // need to ensure a scheme has been provided, otherwise fallback to the existing. 74 74 $new_url_scheme = parse_url( $blog_data['url'], PHP_URL_SCHEME ); 75 75 … … 81 81 $blog_data['scheme'] = $update_parsed_url['scheme']; 82 82 $blog_data['domain'] = $update_parsed_url['host']; 83 83 $blog_data['path'] = $update_parsed_url['path']; 84 } else {85 // Only the path can be updated for a subdirectory configuration, so capture existing domain.86 $blog_data['domain'] = $details->domain;87 84 } 88 85 89 86 $existing_details = get_blog_details( $id, false ); … … 174 171 <td><?php echo esc_url( $details->siteurl ); ?></td> 175 172 </tr> 176 173 <?php 177 // In a subdomain configuration, the scheme, domain, and path can all be changed.178 else if ( is_subdomain_install() ): ?>174 // For any other site, the scheme, domain, and path can all be changed. 175 else : ?> 179 176 <tr class="form-field form-required"> 180 177 <th scope="row"><?php _e( 'Site URL' ); ?></th> 181 178 <td><input name="blog[url]" type="text" id="url" value="<?php echo $parsed_scheme . '://' . esc_attr( $details->domain ) . esc_attr( $details->path ); ?>" /></td> 182 179 </tr> 183 <?php184 // In a subdirectory configuration, only the path can be changed.185 // Scheme and domain are inherited from the network.186 else : ?>187 <tr class="form-field">188 <th scope="row"><?php _e( 'Domain' ); ?></th>189 <td><?php echo $parsed_scheme . ':// ' . esc_attr( $details->domain ); ?></td>190 </tr>191 <tr class="form-field form-required">192 <th scope="row"><label for="path"><?php _e( 'Path' ) ?></label></th>193 <td>194 <input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />195 </td>196 </tr>197 180 <?php endif; ?> 198 181 199 182 <tr class="form-field">