Make WordPress Core


Ignore:
Timestamp:
12/03/2012 03:42:02 AM (14 years ago)
Author:
nacin
Message:

When creating a network, use get_home_path() to calculate where .htaccess (or web.config) lives. fixes #22639.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network.php

    r22981 r22982  
    317317        $rewrite_base      = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
    318318
     319        $home_path         = get_home_path();
     320
    319321        $location_of_wp_config = ABSPATH;
    320322        if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) )
     
    345347        }
    346348
    347         $subdir_match        = $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?';
     349        $subdir_match          = $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?';
    348350        $subdir_replacement_01 = $subdomain_install ? '' : '$1';
    349351        $subdir_replacement_12 = $subdomain_install ? '$1' : '$2';
     
    354356                <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
    355357                <div class="updated inline"><p><?php
    356                         if ( file_exists( ABSPATH . '.htaccess' ) )
     358                        if ( file_exists( $home_path . '.htaccess' ) )
    357359                                printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), '.htaccess' );
    358                         elseif ( file_exists( ABSPATH . 'web.config' ) )
     360                        elseif ( file_exists( $home_path . 'web.config' ) )
    359361                                printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), 'web.config' );
    360362                        else
     
    459461
    460462        ?>
    461                 <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>
     463                <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>
    462464                <?php
    463465                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' )
     
    493495
    494496                ?>
    495                 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
     497                <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p>
    496498                <?php
    497499                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' )
Note: See TracChangeset for help on using the changeset viewer.