summaryrefslogtreecommitdiff
path: root/includes/db/DatabasePostgres.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/db/DatabasePostgres.php')
-rw-r--r--includes/db/DatabasePostgres.php25
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 {
+}