utilise wp_guess_url() in installation redirection to provide an Absolute URL. See #14062. See #14904

git-svn-id: https://develop.svn.wordpress.org/trunk@15680 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-10-02 03:08:02 +00:00
parent f81a980a70
commit c9ab260ab4
2 changed files with 4 additions and 7 deletions

View File

@ -3483,7 +3483,7 @@ function wp_guess_url() {
$schema = is_ssl() ? 'https://' : 'http://';
$url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return $url;
return rtrim($url, '/');
}
/**

View File

@ -419,12 +419,9 @@ function wp_not_installed() {
if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) )
wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) );
} elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) {
if ( defined( 'WP_SITEURL' ) )
$link = WP_SITEURL . '/wp-admin/install.php';
elseif ( false !== strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) )
$link = preg_replace( '|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php';
else
$link = preg_replace( '|/[^/]+?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php';
$link = wp_guess_url() . '/wp-admin/install.php';
require( ABSPATH . WPINC . '/kses.php' );
require( ABSPATH . WPINC . '/pluggable.php' );
require( ABSPATH . WPINC . '/formatting.php' );