Changeset 13209 for trunk/wp-includes/wp-db.php
- Timestamp:
- 02/19/2010 01:03:58 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/wp-db.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r13174 r13209 346 346 */ 347 347 function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { 348 if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true)348 if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) 349 349 $this->db_connect(); 350 350 return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); … … 368 368 register_shutdown_function(array(&$this, "__destruct")); 369 369 370 if ( defined( 'WP_DEBUG' ) &&WP_DEBUG )370 if ( WP_DEBUG ) 371 371 $this->show_errors(); 372 372 373 373 if ( is_multisite() ) { 374 374 $this->charset = 'utf8'; 375 if ( defined( 'DB_COLLATE' ) && constant( 'DB_COLLATE' ) != '')376 $this->collate = constant( 'DB_COLLATE' );375 if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) 376 $this->collate = DB_COLLATE; 377 377 else 378 378 $this->collate = 'utf8_general_ci'; 379 } elseif ( defined( 'DB_COLLATE' ) ) { 380 $this->collate = DB_COLLATE; 379 381 } 380 382 381 383 if ( defined('DB_CHARSET') ) 382 384 $this->charset = DB_CHARSET; 383 384 if ( defined('DB_COLLATE') )385 $this->collate = DB_COLLATE;386 385 387 386 $this->dbuser = $dbuser; … … 667 666 $msg = "WordPress database error: [$str]\n{$this->last_query}\n"; 668 667 if ( defined( 'ERRORLOGFILE' ) ) 669 error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ));668 error_log( $msg, 3, ERRORLOGFILE ); 670 669 if ( defined( 'DIEONDBERROR' ) ) 671 670 die( $msg ); … … 808 807 // use $this->dbhglobal for gloal table ops 809 808 unset( $dbh ); 810 if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true) {809 if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) { 811 810 if( $this->blogs != '' && preg_match("/(" . $this->blogs . "|" . $this->users . "|" . $this->usermeta . "|" . $this->site . "|" . $this->sitemeta . "|" . $this->sitecategories . ")/i",$query) ) { 812 811 if( false == isset( $this->dbhglobal ) ) {
Note: See TracChangeset
for help on using the changeset viewer.