WordPress.org

Make WordPress Core

Ticket #4997: 4997.diff

File 4997.diff, 1.9 KB (added by DD32, 11 years ago)
  • wp-admin/install.php

     
    11<?php
    22define('WP_INSTALLING', true);
    33if (!file_exists('../wp-config.php')) {
     4  require_once('../wp-includes/compat.php');
    45  require_once('../wp-includes/functions.php');
    56  wp_die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.", "WordPress &rsaquo; Error");
    67}
  • wp-admin/setup-config.php

     
    11<?php
    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'))
    58        die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
    69
  • wp-includes/functions.php

     
    12411241                $admin_dir = 'wp-admin/';
    12421242
    12431243        if ( !function_exists('did_action') || !did_action('admin_head') ) :
    1244         status_header(500);
    1245         nocache_headers();
    1246         header('Content-Type: text/html; charset=utf-8');
     1244        if( !headers_sent() ){
     1245                status_header(500);
     1246                nocache_headers();
     1247                header('Content-Type: text/html; charset=utf-8');
     1248        }
    12471249
    12481250        if ( empty($title) ){
    12491251                if( function_exists('__') )