Ticket #22383: 22383.2.diff
File 22383.2.diff, 3.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-ms-sites-list-table.php
159 159 } 160 160 161 161 public function get_columns() { 162 $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );163 162 $sites_columns = array( 164 163 'cb' => '<input type="checkbox" />', 165 'blogname' => $blogname_columns,164 'blogname' => __( 'URL' ), 166 165 'lastupdated' => __( 'Last Updated' ), 167 166 'registered' => _x( 'Registered', 'site' ), 168 167 'users' => __( 'Users' ) … … 232 231 } 233 232 echo "<tr{$class}>"; 234 233 235 $blogname = ( is_subdomain_install() ) ? str_replace( '.' . get_current_site()->domain, '', $blog['domain'] ) :$blog['path'];234 $blogname = $blog['domain'] . $blog['path']; 236 235 237 236 list( $columns, $hidden ) = $this->get_column_info(); 238 237 -
src/wp-admin/network/site-info.php
50 50 51 51 switch_to_blog( $id ); 52 52 53 $url_parts = parse_url( 'http://' . $_POST['blog']['url'] ); 54 unset( $_POST['blog']['url'] ); 55 56 $_POST['blog']['domain'] = $url_parts['host']; 57 $_POST['blog']['path'] = $url_parts['path']; 58 53 59 // Rewrite rules can't be flushed during switch to blog. 54 60 delete_option( 'rewrite_rules' ); 55 61 … … 124 130 <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> 125 131 <table class="form-table"> 126 132 <tr class="form-field form-required"> 127 <th scope="row"><?php _e( 'Domain' ) ?></th> 128 <?php if ( $is_main_site ) { ?> 129 <td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td> 133 <th scope="row"><?php _e( 'URL' ) ?></th> 134 <td> 135 <?php 136 $protocol = is_ssl() ? 'https://' : 'http://'; 137 if ( $is_main_site ) { ?> 138 <code><?php echo $protocol; echo esc_html( $site_url_no_http ); ?></code> 130 139 <?php } else { ?> 131 <td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" /></td> 140 <?php echo $protocol; ?><input name="blog[url]" type="text" id="url" value="<?php echo esc_attr( $site_url_no_http ) ?>" /><br /> 141 <label><input type="checkbox" name="update_home_url" value="update" <?php if ( get_blog_option( $id, 'siteurl' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) || get_blog_option( $id, 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label> 132 142 <?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 <?php139 } else {140 switch_to_blog( $id );141 ?>142 <td>143 <input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />144 <label><input type="checkbox" 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.' ); ?></label>145 143 </td> 146 <?php147 restore_current_blog();148 } ?>149 144 </tr> 150 145 <tr class="form-field"> 151 146 <th scope="row"><?php _ex( 'Registered', 'site' ) ?></th>