Changeset 14386
- Timestamp:
- 05/03/2010 07:23:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network.php
r14374 r14386 45 45 function allow_subdomain_install() { 46 46 $domain = preg_replace( '|https?://[^/]|', '', get_option( 'siteurl' ) ); 47 if( false !== strpos( $domain, '/' ) || 'localhost' == $ _SERVER[ 'HTTP_HOST' ])47 if( false !== strpos( $domain, '/' ) || 'localhost' == $domain || preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $domain ) ) 48 48 return false; 49 49 … … 107 107 $hostname = get_clean_basedomain(); 108 108 $has_ports = strstr( $hostname, ':' ); 109 if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) 110 || ( $no_ip = preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) ) { 109 if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { 111 110 echo '<div class="error"><p><strong>' . __( 'Error:') . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</strong></p></div>'; 112 111 if ( $no_ip )
Note: See TracChangeset
for help on using the changeset viewer.