Changeset 6701 for trunk/wp-includes/wp-db.php
- Timestamp:
- 01/31/2008 10:09:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r6469 r6701 65 65 $this->collate = DB_COLLATE; 66 66 67 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword );67 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); 68 68 if (!$this->dbh) { 69 69 $this->bail(" … … 82 82 $this->ready = true; 83 83 84 if ( !empty($this->charset) && version_compare(mysql_get_server_info( ), '4.1.0', '>=') )84 if ( !empty($this->charset) && version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') ) 85 85 $this->query("SET NAMES '$this->charset'"); 86 86 … … 494 494 global $wp_version; 495 495 // Make sure the server has MySQL 4.0 496 $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info( ));496 $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info($this->dbh)); 497 497 if ( version_compare($mysql_version, '4.0.0', '<') ) 498 498 return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version)); … … 505 505 function supports_collation() 506 506 { 507 return ( version_compare(mysql_get_server_info( ), '4.1.0', '>=') );507 return ( version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') ); 508 508 } 509 509
Note: See TracChangeset
for help on using the changeset viewer.