Changeset 12674 for trunk/wp-includes/ms-functions.php
- Timestamp:
- 01/08/2010 09:25:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-functions.php
r12673 r12674 32 32 global $current_site; 33 33 34 if( defined( "VHOST" ) && constant( "VHOST" ) == 'yes') {34 if( is_subdomain_install() ) { 35 35 if( $blogname == 'main' ) 36 36 $blogname = 'www'; … … 42 42 43 43 function get_blogaddress_by_domain( $domain, $path ){ 44 if( defined( "VHOST" ) && constant( "VHOST" ) == 'yes') {44 if( is_subdomain_install() ) { 45 45 $url = "http://".$domain.$path; 46 46 } else { … … 109 109 return $blog_id; 110 110 111 if ( defined('VHOST') && constant( 'VHOST' ) == 'yes') {111 if ( is_subdomain_install() ) { 112 112 $domain = $name . '.' . $current_site->domain; 113 113 $path = $current_site->path; … … 1034 1034 1035 1035 // do not allow users to create a blog that conflicts with a page on the main blog. 1036 if ( constant( "VHOST" ) == 'no'&& $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) {1036 if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) { 1037 1037 $errors->add( 'blogname', __( "Sorry, you may not use that blog name" ) ); 1038 1038 } … … 1052 1052 1053 1053 // Check if the domain/path has been used already. 1054 if( constant( "VHOST" ) == 'yes') {1054 if( is_subdomain_install() ) { 1055 1055 $mydomain = "$blogname.$domain"; 1056 1056 $path = $base; … … 1139 1139 1140 1140 // Send email with activation link. 1141 if( constant( "VHOST" ) == 'no'|| $current_site->id != 1 ) {1141 if( !is_subdomain_install() || $current_site->id != 1 ) { 1142 1142 $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key"; 1143 1143 } else { … … 1268 1268 function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) { 1269 1269 $domain = preg_replace( "/\s+/", '', sanitize_user( $domain, true ) ); 1270 if( constant( 'VHOST' ) == 'yes')1270 if( is_subdomain_install() ) 1271 1271 $domain = str_replace( '@', '', $domain ); 1272 1272 $title = strip_tags( $title );
Note: See TracChangeset
for help on using the changeset viewer.