From 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 Mon Sep 17 00:00:00 2001
From: donncha
Date: Fri, 12 Oct 2007 16:21:15 +0000
Subject: Merge with WP 2.3 - testing use only! Move pluggable functions out of
wpmu-functions and into pluggable.php, fixes #439
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36
---
wp-admin/setup-config.php | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
(limited to 'wp-admin/setup-config.php')
diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
index 41e9787..139ccd3 100644
--- a/wp-admin/setup-config.php
+++ b/wp-admin/setup-config.php
@@ -2,19 +2,28 @@
die();
define('WP_INSTALLING', true);
+require_once('../wp-includes/compat.php');
+require_once('../wp-includes/functions.php');
+
if (!file_exists('../wp-config-sample.php'))
- die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
+ wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
$configFile = file('../wp-config-sample.php');
-if (!is_writable('../')) die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
+if ( !is_writable('../'))
+ wp_die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
+// Check if wp-config.php has been created
+if (file_exists('../wp-config.php'))
+ wp_die("The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
");
if (isset($_GET['step']))
$step = $_GET['step'];
else
$step = 0;
-header( 'Content-Type: text/html; charset=utf-8' );
+
+function display_header(){
+ header( 'Content-Type: text/html; charset=utf-8' );
?>
@@ -77,12 +86,11 @@ header( 'Content-Type: text/html; charset=utf-8' );

The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
");
+}//end function display_header();
switch($step) {
case 0:
+ display_header();
?>
Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.
@@ -99,6 +107,7 @@ switch($step) {
break;
case 1:
+ display_header();
?>