From b14e26cb49492f16b3913fc0d9f18335896ad0aa Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 3 Sep 2010 15:53:08 +0000 Subject: [PATCH] Followup r72234, pass $this->mConn instead of null --- includes/db/DatabasePostgres.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 7a3929b554..fa349dea3e 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -137,7 +137,7 @@ class DatabasePostgres extends DatabaseBase { function hasConstraint( $name ) { global $wgDBmwschema; - $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" . pg_escape_string( null, $name ) . "' AND n.nspname = '" . pg_escape_string( null, $wgDBmwschema ) ."'"; + $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" . pg_escape_string( $this->mConn, $name ) . "' AND n.nspname = '" . pg_escape_string( $this->mConn, $wgDBmwschema ) ."'"; return $this->numRows($res = $this->doQuery($SQL)); } @@ -1339,7 +1339,7 @@ SQL; } function encodeBlob( $b ) { - return new Blob ( pg_escape_bytea( null, $b ) ) ; + return new Blob ( pg_escape_bytea( $this->mConn, $b ) ) ; } function decodeBlob( $b ) { @@ -1350,7 +1350,7 @@ SQL; } function strencode( $s ) { ## Should not be called by us - return pg_escape_string( null, $s ); + return pg_escape_string( $this->mConn, $s ); } function addQuotes( $s ) { @@ -1361,7 +1361,7 @@ SQL; } else if ($s instanceof Blob) { return "'".$s->fetch($s)."'"; } - return "'" . pg_escape_string( null, $s ) . "'"; + return "'" . pg_escape_string( $this->mConn, $s ) . "'"; } function quote_ident( $s ) { -- 2.20.1