Make get_home_path() return consistent slashes. fixes #23175.
git-svn-id: http://core.svn.wordpress.org/trunk@23669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f68ac01d4c
commit
28248c1b08
|
@ -90,7 +90,7 @@ function get_home_path() {
|
||||||
$home_path = ABSPATH;
|
$home_path = ABSPATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $home_path;
|
return str_replace( '\\', '/', $home_path );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -314,7 +314,7 @@ function network_step2( $errors = false ) {
|
||||||
$base = parse_url( $slashed_home, PHP_URL_PATH );
|
$base = parse_url( $slashed_home, PHP_URL_PATH );
|
||||||
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
|
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
|
||||||
$abspath_fix = str_replace( '\\', '/', ABSPATH );
|
$abspath_fix = str_replace( '\\', '/', ABSPATH );
|
||||||
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : str_replace( '\\', '/', get_home_path() );
|
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
|
||||||
$wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
|
$wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
|
||||||
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
|
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue