Changeset 15638
- Timestamp:
- 09/20/2010 07:13:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15636 r15638 3102 3102 3103 3103 /** 3104 * Load the correct database class file.3105 *3106 * This function is used to load the database class file either at runtime or by3107 * wp-admin/setup-config.php We must globalise $wpdb to ensure that it is3108 * defined globally by the inline code in wp-db.php.3109 *3110 * @since 2.5.03111 * @global $wpdb WordPress Database Object3112 */3113 function require_wp_db() {3114 global $wpdb;3115 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )3116 require_once( WP_CONTENT_DIR . '/db.php' );3117 else3118 require_once( ABSPATH . WPINC . '/wp-db.php' );3119 }3120 3121 /**3122 3104 * Load custom DB error or display WordPress DB error. 3123 3105 * -
trunk/wp-includes/load.php
r15558 r15638 306 306 } 307 307 } 308 } 309 310 /** 311 * Load the correct database class file. 312 * 313 * This function is used to load the database class file either at runtime or by 314 * wp-admin/setup-config.php. We must globalize $wpdb to ensure that it is 315 * defined globally by the inline code in wp-db.php. 316 * 317 * @since 2.5.0 318 * @global $wpdb WordPress Database Object 319 */ 320 function require_wp_db() { 321 global $wpdb; 322 323 require_once( ABSPATH . WPINC . '/wp-db.php' ); 324 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) ) 325 require_once( WP_CONTENT_DIR . '/db.php' ); 326 327 if ( isset( $wpdb ) ) 328 return; 329 330 $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST ); 308 331 } 309 332 -
trunk/wp-includes/wp-db.php
r15564 r15638 1555 1555 } 1556 1556 1557 if ( ! isset( $wpdb ) ) {1558 /**1559 * WordPress Database Object, if it isn't set already in wp-content/db.php1560 * @global object $wpdb Creates a new wpdb object based on wp-config.php Constants for the database1561 * @since 0.711562 */1563 $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );1564 }1565 1557 ?> -
trunk/wp-settings.php
r14345 r15638 68 68 require( ABSPATH . WPINC . '/classes.php' ); 69 69 70 // Include the wpdb class , or a db.php database drop-in if present.70 // Include the wpdb class and, if present, a db.php database drop-in. 71 71 require_wp_db(); 72 72
Note: See TracChangeset
for help on using the changeset viewer.