Make WordPress Core


Ignore:
Timestamp:
09/19/2007 04:27:56 AM (18 years ago)
Author:
ryan
Message:

Fix includes for setup-config so that wp_die is defined. Props DD32. fixes #4997

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/setup-config.php

    r5001 r6137  
    22define('WP_INSTALLING', true);
    33
     4require_once('../wp-includes/compat.php');
     5require_once('../wp-includes/functions.php');
     6
    47if (!file_exists('../wp-config-sample.php'))
    5     die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
     8    wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
    69
    710$configFile = file('../wp-config-sample.php');
    811
    9 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.");
     12if ( !is_writable('../'))
     13    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.");
    1014
     15// Check if wp-config.php has been created
     16if (file_exists('../wp-config.php'))
     17    wp_die("<p>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 <a href='install.php'>installing now</a>.</p>");
    1118
    1219if (isset($_GET['step']))
     
    1421else
    1522    $step = 0;
    16 header( 'Content-Type: text/html; charset=utf-8' );
     23
     24function display_header(){
     25    header( 'Content-Type: text/html; charset=utf-8' );
    1726?>
    1827<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    7786<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
    7887<?php
    79 // Check if wp-config.php has been created
    80 if (file_exists('../wp-config.php'))
    81     die("<p>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 <a href='install.php'>installing now</a>.</p></body></html>");
     88}//end function display_header();
    8289
    8390switch($step) {
    8491    case 0:
     92        display_header();
    8593?>
    8694
     
    99107
    100108    case 1:
     109        display_header();
    101110    ?>
    102111</p>
     
    178187    fclose($handle);
    179188    chmod('../wp-config.php', 0666);
     189   
     190    display_header();
    180191?>
    181192<p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to <a href="install.php">run the install!</a></p>
Note: See TracChangeset for help on using the changeset viewer.