More streamlined install process. Obeys WP_SITEURL if defined. fixes #4687 (props JeremyVisser, Nazgul), see #4685

git-svn-id: https://develop.svn.wordpress.org/trunk@5844 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-08-03 01:08:59 +00:00
parent 02df990e1f
commit baf85f8428
2 changed files with 27 additions and 28 deletions
+9 -5
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');