Fix wp_guess_url() to work in every scenario I could find, allows us to use it to determine the correct path to the WordPress Site URL before installation for install.php and setup-config.php redirects. Fixes #24480 Fixes #16884

git-svn-id: https://develop.svn.wordpress.org/trunk@25396 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2013-09-12 06:56:20 +00:00
parent 285db00ed4
commit cccac649d5
4 changed files with 32 additions and 15 deletions

View File

@@ -445,12 +445,12 @@ 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' ) ) {
$link = wp_guess_url() . '/wp-admin/install.php';
require( ABSPATH . WPINC . '/kses.php' );
require( ABSPATH . WPINC . '/pluggable.php' );
require( ABSPATH . WPINC . '/formatting.php' );
$link = wp_guess_url() . '/wp-admin/install.php';
wp_redirect( $link );
die();
}