http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72289

Revision: 72289
Author:   reedy
Date:     2010-09-03 15:53:08 +0000 (Fri, 03 Sep 2010)

Log Message:
-----------
Followup r72234, pass $this->mConn instead of null

Modified Paths:
--------------
    trunk/phase3/includes/db/DatabasePostgres.php

Modified: trunk/phase3/includes/db/DatabasePostgres.php
===================================================================
--- trunk/phase3/includes/db/DatabasePostgres.php       2010-09-03 15:03:31 UTC 
(rev 72288)
+++ trunk/phase3/includes/db/DatabasePostgres.php       2010-09-03 15:53:08 UTC 
(rev 72289)
@@ -137,7 +137,7 @@
 
        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 @@
        }
 
        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 @@
        }
 
        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 @@
                } 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 ) {



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to