Make WordPress Core


Ignore:
Timestamp:
01/29/2014 05:27:24 AM (11 years ago)
Author:
wonderboymusic
Message:

In wpdb::db_connect(), allow the loading of a custom database error template - this is already allowed in dead_db().

In dead_db(), move the call to wp_load_translations_early() before the inclusion of the db-error.php file to allow translation in both locations before the template is loaded.

Props sbruner, kovshenin.
Fixes #25703.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r26512 r27056  
    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>
Note: See TracChangeset for help on using the changeset viewer.