mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Basic support for the mysql_connect() new_link and client_flags arguments. props Otto42, fixes #19324.
git-svn-id: http://core.svn.wordpress.org/trunk@21609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1d46178afd
commit
e225c12704
@ -1135,10 +1135,13 @@ class wpdb {
|
||||
|
||||
$this->is_mysql = true;
|
||||
|
||||
$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
|
||||
$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
|
||||
|
||||
if ( WP_DEBUG ) {
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
} else {
|
||||
$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
|
||||
$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
}
|
||||
|
||||
if ( !$this->dbh ) {
|
||||
|
Loading…
Reference in New Issue
Block a user