Merge "Avoid 'message' in log context in AuthManager"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseMysqli.php
index e468601..c34f901 100644 (file)
@@ -54,8 +54,6 @@ class DatabaseMysqli extends DatabaseMysqlBase {
         * @throws DBConnectionError
         */
        protected function mysqlConnect( $realServer ) {
-               global $wgDBmysql5;
-
                # Avoid suppressed fatal error, which is very hard to track down
                if ( !function_exists( 'mysqli_init' ) ) {
                        throw new DBConnectionError( $this, "MySQLi functions missing,"
@@ -84,7 +82,7 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                $mysqli = mysqli_init();
 
                $connFlags = 0;
-               if ( $this->mFlags & DBO_SSL ) {
+               if ( $this->mFlags & self::DBO_SSL ) {
                        $connFlags |= MYSQLI_CLIENT_SSL;
                        $mysqli->ssl_set(
                                $this->sslKeyPath,
@@ -94,14 +92,14 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                                $this->sslCiphers
                        );
                }
-               if ( $this->mFlags & DBO_COMPRESS ) {
+               if ( $this->mFlags & self::DBO_COMPRESS ) {
                        $connFlags |= MYSQLI_CLIENT_COMPRESS;
                }
-               if ( $this->mFlags & DBO_PERSISTENT ) {
+               if ( $this->mFlags & self::DBO_PERSISTENT ) {
                        $realServer = 'p:' . $realServer;
                }
 
-               if ( $wgDBmysql5 ) {
+               if ( $this->utf8Mode ) {
                        // Tell the server we're communicating with it in UTF-8.
                        // This may engage various charset conversions.
                        $mysqli->options( MYSQLI_SET_CHARSET_NAME, 'utf8' );