summaryrefslogtreecommitdiff
path: root/includes/db/DatabasePostgres.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
commit6dc1997577fab2c366781fd7048144935afa0012 (patch)
tree8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/db/DatabasePostgres.php
parent150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff)
parentfa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff)
Merge commit 'fa89acd'
# Conflicts: # .gitignore # extensions/ArchInterWiki.sql
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 {
+}