Ticket #22639: 22639.diff
File 22639.diff, 2.9 KB (added by , 11 years ago) |
---|
-
wp-admin/network.php
315 315 $wp_dir_from_root = preg_replace( '#^' . preg_quote( $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH ); 316 316 $wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) ); 317 317 $rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; 318 $home_path = ABSPATH; 319 if ( '/' != $wp_dir_from_root ) 320 $home_path = trailingslashit( str_replace( $wp_dir_from_root, '', ABSPATH ) ); 318 321 319 322 // Wildcard DNS message. 320 323 if ( is_wp_error( $errors ) ) … … 349 352 <h3><?php esc_html_e( 'Enabling the Network' ); ?></h3> 350 353 <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p> 351 354 <div class="updated inline"><p><?php 352 if ( file_exists( ABSPATH . '.htaccess') )355 if ( file_exists( trailingslashit( $home_path . '.htaccess' ) ) ) 353 356 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), '.htaccess' ); 354 elseif ( file_exists( ABSPATH . 'web.config') )357 elseif ( file_exists( trailingslashit( $home_path . 'web.config' ) ) ) 355 358 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), 'web.config' ); 356 359 else 357 360 _e( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> file.' ); … … 454 457 EOF; 455 458 456 459 ?> 457 <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), trailingslashit( str_replace( trailingslashit( $wp_siteurl_subdir ), '', ABSPATH ) )); ?></p>460 <li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p> 458 461 <?php 459 462 if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 460 463 echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>'; … … 488 491 EOF; 489 492 490 493 ?> 491 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH); ?></p>494 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p> 492 495 <?php 493 496 if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) 494 497 echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';