WordPress.org

Make WordPress Core

Changeset 14386


Ignore:
Timestamp:
05/03/10 19:23:37 (4 years ago)
Author:
wpmuguru
Message:

allow subdir multisite on ip address, see #12142

File:
1 edited

Legend:

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

    r14374 r14386  
    4545function allow_subdomain_install() { 
    4646    $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 ) ) 
    4848        return false; 
    4949 
     
    107107    $hostname = get_clean_basedomain(); 
    108108    $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' ) ) ) ) { 
    111110        echo '<div class="error"><p><strong>' . __( 'Error:') . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</strong></p></div>'; 
    112111        if ( $no_ip ) 
Note: See TracChangeset for help on using the changeset viewer.