Always include wp-db.php. Prevents a conditional include and allows db dropins to cleanly extend the wpdb class. Move require_wp_db() to load.php for consistency with bootloader helpers. fixes #14508.

git-svn-id: https://develop.svn.wordpress.org/trunk@15638 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-09-20 19:13:47 +00:00
parent 5207524203
commit 5963feeca6
4 changed files with 24 additions and 27 deletions
-18
View File
@@ -3100,24 +3100,6 @@ function wp_ob_end_flush_all() {
ob_end_flush();
}
/**
* Load the correct database class file.
*
* This function is used to load the database class file either at runtime or by
* wp-admin/setup-config.php We must globalise $wpdb to ensure that it is
* defined globally by the inline code in wp-db.php.
*
* @since 2.5.0
* @global $wpdb WordPress Database Object
*/
function require_wp_db() {
global $wpdb;
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
require_once( WP_CONTENT_DIR . '/db.php' );
else
require_once( ABSPATH . WPINC . '/wp-db.php' );
}
/**
* Load custom DB error or display WordPress DB error.
*