Changeset 12674 for trunk/wp-includes/ms-settings.php
- Timestamp:
- 01/08/2010 09:25:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-settings.php
r12632 r12674 1 1 <?php 2 3 /** 4 * Whether a subdomain configuration is enabled 5 * 6 * @since 3.0 7 * 8 * @return bool True if subdomain configuration is enabled, false otherwise. 9 */ 10 function is_subdomain_install() { 11 if ( defined('VHOST') && VHOST == 'yes' ) 12 return true; 13 14 return false; 15 } 16 2 17 if( isset( $current_site ) && isset( $current_blog ) ) 3 18 return; … … 66 81 } 67 82 $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) ); 68 if( constant( 'VHOST' ) == 'yes') {83 if( is_subdomain_install() ) { 69 84 $current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE domain = %s AND path = %s", $domain, $path) ); 70 85 if( $current_site != null ) … … 114 129 $current_site->blog_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE domain='{$current_site->domain}' AND path='{$current_site->path}'" ); 115 130 116 if( constant( 'VHOST' ) == 'yes') {131 if( is_subdomain_install() ) { 117 132 $current_blog = wp_cache_get( 'current_blog_' . $domain, 'site-options' ); 118 133 if( !$current_blog ) { … … 144 159 } 145 160 146 if( defined( "WP_INSTALLING" ) == false && constant( 'VHOST' ) == 'yes'&& !is_object( $current_blog ) ) {161 if( defined( "WP_INSTALLING" ) == false && is_subdomain_install() && !is_object( $current_blog ) ) { 147 162 if( defined( 'NOBLOGREDIRECT' ) ) { 148 163 $destination = constant( 'NOBLOGREDIRECT' );
Note: See TracChangeset
for help on using the changeset viewer.