X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabaseMysql.php;h=77e797d49ccaff239487da858712e51559544554;hp=87330b0e05548f1cd14f804b5701d23365b419ff;hb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1;hpb=3d653e8ab542e502f4dcf574c9e4917cf56a5f8c diff --git a/includes/libs/rdbms/database/DatabaseMysql.php b/includes/libs/rdbms/database/DatabaseMysql.php index 87330b0e05..77e797d49c 100644 --- a/includes/libs/rdbms/database/DatabaseMysql.php +++ b/includes/libs/rdbms/database/DatabaseMysql.php @@ -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' );