From 5be468ea5f9d5f6bbaf14ba073d4ffc65b51d3c4 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@13622 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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.'); ?>