diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/db/DatabasePostgres.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/db/DatabasePostgres.php')
-rw-r--r-- | includes/db/DatabasePostgres.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 9287f7a6..56a5b2cf 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -217,7 +217,7 @@ class PostgresTransactionState { * @since 1.19 */ class SavepointPostgres { - /** @var DatabaseBase Establish a savepoint within a transaction */ + /** @var DatabasePostgres Establish a savepoint within a transaction */ protected $dbw; protected $id; protected $didbegin; @@ -551,9 +551,9 @@ class DatabasePostgres extends DatabaseBase { if ( $res instanceof ResultWrapper ) { $res = $res->result; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $ok = pg_free_result( $res ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( !$ok ) { throw new DBUnexpectedError( $this, "Unable to free Postgres result\n" ); } @@ -568,9 +568,9 @@ class DatabasePostgres extends DatabaseBase { if ( $res instanceof ResultWrapper ) { $res = $res->result; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $row = pg_fetch_object( $res ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); # @todo FIXME: HACK HACK HACK HACK debug # @todo hashar: not sure if the following test really trigger if the object @@ -589,9 +589,9 @@ class DatabasePostgres extends DatabaseBase { if ( $res instanceof ResultWrapper ) { $res = $res->result; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $row = pg_fetch_array( $res ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( pg_last_error( $this->mConn ) ) { throw new DBUnexpectedError( $this, @@ -606,9 +606,9 @@ class DatabasePostgres extends DatabaseBase { if ( $res instanceof ResultWrapper ) { $res = $res->result; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $n = pg_num_rows( $res ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( pg_last_error( $this->mConn ) ) { throw new DBUnexpectedError( $this, @@ -1510,7 +1510,9 @@ SQL; return pg_unescape_bytea( $b ); } - function strencode( $s ) { # Should not be called by us + function strencode( $s ) { + // Should not be called by us + return pg_escape_string( $this->mConn, $s ); } @@ -1702,4 +1704,5 @@ SQL; } } // end DatabasePostgres class -class PostgresBlob extends Blob {} +class PostgresBlob extends Blob { +} |