More streamlined install process. Obeys WP_SITEURL if defined. fixes #4687 (props JeremyVisser, Nazgul), see #4685
git-svn-id: http://svn.automattic.com/wordpress/trunk@5844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -142,12 +142,16 @@ include_once(ABSPATH . WPINC . '/gettext.php');
|
||||
require_once (ABSPATH . WPINC . '/l10n.php');
|
||||
|
||||
if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
|
||||
if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
|
||||
$link = 'install.php';
|
||||
if ( defined('WP_SITEURL') )
|
||||
$link = WP_SITEURL . '/wp-admin/install.php';
|
||||
elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
|
||||
$link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
|
||||
else
|
||||
$link = 'wp-admin/install.php';
|
||||
|
||||
wp_die( sprintf( 'It doesn’t look like you’ve installed WP yet. Try running <a href="%s">install.php</a>.', $link ) );
|
||||
$link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
|
||||
require_once(ABSPATH . WPINC . '/kses.php');
|
||||
require_once(ABSPATH . WPINC . '/pluggable.php');
|
||||
wp_redirect($link);
|
||||
die(); // have to die here ~ Mark
|
||||
}
|
||||
|
||||
require (ABSPATH . WPINC . '/formatting.php');
|
||||
|
||||
Reference in New Issue
Block a user