Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseMysql.php
index 87330b0..77e797d 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Database
  */
+namespace Wikimedia\Rdbms;
 
 /**
  * Database abstraction object for PHP extension mysql.
@@ -59,10 +60,10 @@ class DatabaseMysql extends DatabaseMysqlBase {
                }
 
                $connFlags = 0;
-               if ( $this->mFlags & DBO_SSL ) {
+               if ( $this->mFlags & self::DBO_SSL ) {
                        $connFlags |= MYSQL_CLIENT_SSL;
                }
-               if ( $this->mFlags & DBO_COMPRESS ) {
+               if ( $this->mFlags & self::DBO_COMPRESS ) {
                        $connFlags |= MYSQL_CLIENT_COMPRESS;
                }
 
@@ -81,7 +82,7 @@ class DatabaseMysql extends DatabaseMysqlBase {
                        if ( $i > 1 ) {
                                usleep( 1000 );
                        }
-                       if ( $this->mFlags & DBO_PERSISTENT ) {
+                       if ( $this->mFlags & self::DBO_PERSISTENT ) {
                                $conn = mysql_pconnect( $realServer, $this->mUser, $this->mPassword, $connFlags );
                        } else {
                                # Create a new connection...
@@ -202,3 +203,5 @@ class DatabaseMysql extends DatabaseMysqlBase {
                return mysql_real_escape_string( $s, $conn );
        }
 }
+
+class_alias( DatabaseMysql::class, 'DatabaseMysql' );