Make WordPress Core

Ticket #25703: 25703.diff

File 25703.diff, 1.5 KB (added by kovshenin, 11 years ago)
  • src/wp-includes/functions.php

     
    27932793function dead_db() {
    27942794        global $wpdb;
    27952795
     2796        wp_load_translations_early();
     2797
    27962798        // Load custom DB error template, if present.
    27972799        if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
    27982800                require_once( WP_CONTENT_DIR . '/db-error.php' );
     
    28072809        status_header( 500 );
    28082810        nocache_headers();
    28092811        header( 'Content-Type: text/html; charset=utf-8' );
    2810 
    2811         wp_load_translations_early();
    28122812?>
    28132813<!DOCTYPE html>
    28142814<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
  • src/wp-includes/wp-db.php

     
    11541154
    11551155                if ( !$this->dbh ) {
    11561156                        wp_load_translations_early();
     1157
     1158                        // Load custom DB error template, if present.
     1159                        if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
     1160                                require_once( WP_CONTENT_DIR . '/db-error.php' );
     1161                                die();
     1162                        }
     1163
    11571164                        $this->bail( sprintf( __( "
    11581165<h1>Error establishing a database connection</h1>
    11591166<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>