Display the site scheme, not the current scheme on Edit Site screen in network admin.

props johnbillion.
fixes #28406.

git-svn-id: https://develop.svn.wordpress.org/trunk@28643 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-05-30 22:00:45 +00:00
parent dbef7e2587
commit 9120e6a9d7
1 changed files with 4 additions and 5 deletions

View File

@ -42,6 +42,7 @@ $details = get_blog_details( $id );
if ( !can_edit_network( $details->site_id ) ) if ( !can_edit_network( $details->site_id ) )
wp_die( __( 'You do not have permission to access this page.' ) ); wp_die( __( 'You do not have permission to access this page.' ) );
$parsed = parse_url( $details->siteurl );
$is_main_site = is_main_site( $id ); $is_main_site = is_main_site( $id );
if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) { if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) {
@ -122,12 +123,10 @@ if ( ! empty( $messages ) ) {
<table class="form-table"> <table class="form-table">
<tr class="form-field form-required"> <tr class="form-field form-required">
<th scope="row"><?php _e( 'Domain' ) ?></th> <th scope="row"><?php _e( 'Domain' ) ?></th>
<?php <?php if ( $is_main_site ) { ?>
$protocol = is_ssl() ? 'https://' : 'http://'; <td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
if ( $is_main_site ) { ?>
<td><code><?php echo $protocol; echo esc_attr( $details->domain ) ?></code></td>
<?php } else { ?> <?php } else { ?>
<td><?php echo $protocol; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td> <td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td>
<?php } ?> <?php } ?>
</tr> </tr>
<tr class="form-field form-required"> <tr class="form-field form-required">