WordPress.org

Make WordPress Core

Changeset 22980


Ignore:
Timestamp:
12/03/12 02:54:29 (17 months ago)
Author:
nacin
Message:

Correctly calculate the location of wp-config.php, used in the instructions for setting up a network. see #22639.

File:
1 edited

Legend:

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

    r22042 r22980  
    317317    $rewrite_base      = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; 
    318318 
     319    $location_of_wp_config = ABSPATH; 
     320    if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) ) 
     321        $location_of_wp_config = trailingslashit( dirname( ABSPATH ) ); 
     322 
    319323    // Wildcard DNS message. 
    320324    if ( is_wp_error( $errors ) ) 
     
    361365?> 
    362366        <ol> 
    363             <li><p><?php printf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That&#8217;s all, stop editing! Happy blogging. */</code>:' ), ABSPATH ); ?></p> 
     367            <li><p><?php printf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That&#8217;s all, stop editing! Happy blogging. */</code>:' ), $location_of_wp_config ); ?></p> 
    364368                <textarea class="code" readonly="readonly" cols="100" rows="6"> 
    365369define('MULTISITE', true); 
Note: See TracChangeset for help on using the changeset viewer.