mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
Check if VHOST is defined in get_id_from_blogname()
git-svn-id: http://svn.automattic.com/wordpress/trunk@12643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
36b2df4606
commit
40efc5b7f4
@ -105,10 +105,10 @@ function is_main_blog() {
|
|||||||
function get_id_from_blogname( $name ) {
|
function get_id_from_blogname( $name ) {
|
||||||
global $wpdb, $current_site;
|
global $wpdb, $current_site;
|
||||||
$blog_id = wp_cache_get( "get_id_from_blogname_" . $name, 'blog-details' );
|
$blog_id = wp_cache_get( "get_id_from_blogname_" . $name, 'blog-details' );
|
||||||
if( $blog_id )
|
if ( $blog_id )
|
||||||
return $blog_id;
|
return $blog_id;
|
||||||
|
|
||||||
if( constant( 'VHOST' ) == 'yes' ) {
|
if ( defined('VHOST') && constant( 'VHOST' ) == 'yes' ) {
|
||||||
$domain = $name . '.' . $current_site->domain;
|
$domain = $name . '.' . $current_site->domain;
|
||||||
$path = $current_site->path;
|
$path = $current_site->path;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user