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:
markjaquith
2007-08-03 01:08:59 +00:00
parent 5897a90fd7
commit 25abcd1338
2 changed files with 27 additions and 28 deletions

View File

@@ -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&#8217;t look like you&#8217;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');