web/wp-content/plugins/wp-super-cache/wp-cache-base.php
changeset 194 32102edaa81b
parent 136 bde1974c263b
equal deleted inserted replaced
193:2f6f6f7551ca 194:32102edaa81b
     8 		var $uri = '';
     8 		var $uri = '';
     9 		var $post = 0;
     9 		var $post = 0;
    10 	}
    10 	}
    11 }
    11 }
    12 
    12 
       
    13 $WPSC_HTTP_HOST = htmlentities( $_SERVER[ 'HTTP_HOST' ] );
       
    14 
       
    15 // We want to be able to identify each blog in a WordPress MU install
       
    16 $blogcacheid = '';
       
    17 if ( defined( 'VHOST' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_ALLOW_MULTISITE' ) == true ) ) {
       
    18 	$blogcacheid = 'blog'; // main blog
       
    19 	if( defined( 'SUBDOMAIN_INSTALL' ) && constant( 'SUBDOMAIN_INSTALL' ) == true ) {
       
    20 		$blogcacheid = $WPSC_HTTP_HOST;
       
    21 	} else {
       
    22 		$request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) );
       
    23 		if( strpos( $request_uri, '/', 1 ) ) {
       
    24 			if( $base == '/' ) {
       
    25 				$blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 );
       
    26 			} else {
       
    27 				$blogcacheid = str_replace( $base, '', $request_uri );
       
    28 				if ( $blogcacheid != '' )
       
    29 					$blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) );
       
    30 			}
       
    31 			if ( '/' == substr($blogcacheid, -1))
       
    32 				$blogcacheid = substr($blogcacheid, 0, -1);
       
    33 		}
       
    34 		$blogcacheid = str_replace( '/', '', $blogcacheid );
       
    35 	}
       
    36 }
       
    37 
    13 ?>
    38 ?>