Merge "Import BatchRowUpdate classes from Echo"
[lhc/web/wiklou.git] / includes / db / DatabaseMssql.php
index d3eee84..85f1b96 100644 (file)
@@ -119,9 +119,9 @@ class DatabaseMssql extends DatabaseBase {
                        $connectionInfo['PWD'] = $password;
                }
 
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $this->mConn = sqlsrv_connect( $server, $connectionInfo );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
 
                if ( $this->mConn === false ) {
                        throw new DBConnectionError( $this, $this->lastError() );
@@ -518,7 +518,7 @@ class DatabaseMssql extends DatabaseBase {
                        $row = $this->fetchRow( $res );
 
                        if ( isset( $row['EstimateRows'] ) ) {
-                               $rows = $row['EstimateRows'];
+                               $rows = (int)$row['EstimateRows'];
                        }
                }
 
@@ -1089,12 +1089,14 @@ class DatabaseMssql extends DatabaseBase {
         * @param string $s
         * @return string
         */
-       public function strencode( $s ) { # Should not be called by us
+       public function strencode( $s ) {
+               // Should not be called by us
+
                return str_replace( "'", "''", $s );
        }
 
        /**
-        * @param string $s
+        * @param string|Blob $s
         * @return string
         */
        public function addQuotes( $s ) {