Index: wp-admin/network.php =================================================================== --- wp-admin/network.php (revision 22978) +++ wp-admin/network.php (working copy) @@ -310,12 +310,16 @@ global $wpdb; $hostname = get_clean_basedomain(); - $slashed_home = trailingslashit( get_option( 'home' ) ); + $home_path = get_home_path(); + + $wp_siteurl_subdir = preg_replace( '#^' . preg_quote( ABSPATH, '#' ) . '#', '', $home_path ); // Will this work on Windows servers? $base = parse_url( $slashed_home, PHP_URL_PATH ); - $wp_dir_from_root = preg_replace( '#^' . preg_quote( $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH ); - $wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) ); $rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : ''; + $location_of_wp_config = ABSPATH; + if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) ) + $location_of_wp_config = trailingslashit( dirname( ABSPATH ) ); + // Wildcard DNS message. if ( is_wp_error( $errors ) ) echo '
Caution: We recommend you back up your existing wp-config.php
and %s
files.' ), '.htaccess' );
- elseif ( file_exists( ABSPATH . 'web.config' ) )
+ elseif ( file_exists( $home_path . 'web.config' ) )
printf( __( 'Caution: We recommend you back up your existing wp-config.php
and %s
files.' ), 'web.config' );
else
_e( 'Caution: We recommend you back up your existing wp-config.php
file.' );
@@ -360,7 +364,7 @@
}
?>
wp-config.php file in %s
above the line reading /* That’s all, stop editing! Happy blogging. */
:' ), ABSPATH ); ?>
wp-config.php file in %s
above the line reading /* That’s all, stop editing! Happy blogging. */
:' ), $location_of_wp_config ); ?>