Don't fallback from uk to ru
[lhc/web/wiklou.git] / includes / db / DatabaseMysqli.php
index 8ca2362..e468601 100644 (file)
@@ -81,9 +81,18 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                        $socket = $hostAndSocket[1];
                }
 
+               $mysqli = mysqli_init();
+
                $connFlags = 0;
                if ( $this->mFlags & DBO_SSL ) {
                        $connFlags |= MYSQLI_CLIENT_SSL;
+                       $mysqli->ssl_set(
+                               $this->sslKeyPath,
+                               $this->sslCertPath,
+                               null,
+                               $this->sslCAPath,
+                               $this->sslCiphers
+                       );
                }
                if ( $this->mFlags & DBO_COMPRESS ) {
                        $connFlags |= MYSQLI_CLIENT_COMPRESS;
@@ -92,7 +101,6 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                        $realServer = 'p:' . $realServer;
                }
 
-               $mysqli = mysqli_init();
                if ( $wgDBmysql5 ) {
                        // Tell the server we're communicating with it in UTF-8.
                        // This may engage various charset conversions.
@@ -309,12 +317,6 @@ class DatabaseMysqli extends DatabaseMysqlBase {
                return $conn->real_escape_string( $s );
        }
 
-       protected function mysqlPing() {
-               $conn = $this->getBindingHandle();
-
-               return $conn->ping();
-       }
-
        /**
         * Give an id for the connection
         *
@@ -322,7 +324,7 @@ class DatabaseMysqli extends DatabaseMysqlBase {
         * @return string
         */
        public function __toString() {
-               if ( $this->mConn instanceof Mysqli ) {
+               if ( $this->mConn instanceof mysqli ) {
                        return (string)$this->mConn->thread_id;
                } else {
                        // mConn might be false or something.