X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabaseMssql.php;h=832ed9e11ea7f8444d8470b6358d888cbf793936;hb=6237fd11b63bfeaa803acd8b9186316e7a543436;hp=4ebc6233ed49e360b553365e6cfb39b5df7b2d23;hpb=616913584de2272c56684d41afa18c65fe8d8dc4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/DatabaseMssql.php b/includes/libs/rdbms/database/DatabaseMssql.php index 4ebc6233ed..832ed9e11e 100644 --- a/includes/libs/rdbms/database/DatabaseMssql.php +++ b/includes/libs/rdbms/database/DatabaseMssql.php @@ -353,7 +353,7 @@ class DatabaseMssql extends Database { /** * @return int */ - public function affectedRows() { + protected function fetchAffectedRowCount() { return $this->mAffectedRows; } @@ -440,8 +440,14 @@ class DatabaseMssql extends Database { if ( strpos( $sql, 'MAX(' ) !== false || strpos( $sql, 'MIN(' ) !== false ) { $bitColumns = []; if ( is_array( $table ) ) { - foreach ( $table as $t ) { - $bitColumns += $this->getBitColumns( $this->tableName( $t ) ); + $tables = $table; + while ( $tables ) { + $t = array_pop( $tables ); + if ( is_array( $t ) ) { + $tables = array_merge( $tables, $t ); + } else { + $bitColumns += $this->getBitColumns( $this->tableName( $t ) ); + } } } else { $bitColumns = $this->getBitColumns( $this->tableName( $table ) ); @@ -1065,7 +1071,6 @@ class DatabaseMssql extends Database { */ public function strencode( $s ) { // Should not be called by us - return str_replace( "'", "''", $s ); }