From 91b380571d663a1ff10ae7789f3d57cca9fc741b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 9 Mar 2010 06:14:42 +0000 Subject: [PATCH] Allow localhost in a multisite subdirectory install. More network.php improvements. see #12457 for localhost. see #11816 git-svn-id: https://develop.svn.wordpress.org/trunk@13622 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/network.php | 22 +++++++++++++++------- wp-includes/ms-default-constants.php | 2 +- wp-includes/ms-load.php | 17 ++++++----------- wp-includes/ms-settings.php | 2 +- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/wp-admin/network.php b/wp-admin/network.php index cf5deb9dc7..e6f951314c 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -56,11 +56,9 @@ function network_step1() { } $hostname = get_clean_basedomain(); - if ( 'localhost' == $hostname || preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) { + if ( preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) { echo '

' . __('You cannot install a network of sites with your server address.' ) . '

'; - echo '

' . __('You cannot use an IP address such as 127.0.0.1 or a single-word hostname like localhost.' ) . '

'; - if ( 'localhost' == $hostname ) - echo '

' . __('Consider using localhost.localdomain.') . '

'; + echo '

' . __('You cannot use an IP address such as 127.0.0.1.' ) . '

'; include( './admin-footer.php' ); die(); } @@ -93,8 +91,8 @@ function network_step1() { +

-

You cannot change this later.' ); ?>

@@ -113,6 +111,8 @@ function network_step1() { @@ -131,6 +131,12 @@ function network_step1() {

+ + + + + + @@ -174,7 +180,7 @@ function network_step2() {
  • wp-config.php file in %s:' ), ABSPATH ); ?>

  • localhost, the sites in your WordPress network must use sub-directories. Consider using localhost.localdomain if you wish to use sub-domains.'); ?>