(bug 17460) Client ecoding is now correctly set for PostgreSQL, as we do for MySQL...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 23 Feb 2009 21:23:14 +0000 (21:23 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 23 Feb 2009 21:23:14 +0000 (21:23 +0000)
RELEASE-NOTES
includes/db/DatabasePostgres.php

index 4378242..26e333d 100644 (file)
@@ -219,6 +219,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   PostgreSQL
 * (bug 17546) Correct Tongan language native name is "lea faka-Tonga"
 * (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
+* (bug 17460) Client ecoding is now correctly set for PostgreSQL
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 6b343b5..ee1e033 100644 (file)
@@ -174,9 +174,11 @@ class DatabasePostgres extends Database {
                global $wgCommandLineMode;
                ## If called from the command-line (e.g. importDump), only show errors
                if ($wgCommandLineMode) {
-                       $this->doQuery("SET client_min_messages = 'ERROR'");
+                       $this->doQuery( "SET client_min_messages = 'ERROR'" );
                }
 
+               $this->doQuery( "SET client_encoding='UTF8'" );
+
                global $wgDBmwschema, $wgDBts2schema;
                if (isset( $wgDBmwschema ) && isset( $wgDBts2schema )
                        && $wgDBmwschema !== 'mediawiki'
@@ -185,7 +187,7 @@ class DatabasePostgres extends Database {
                ) {
                        $safeschema = $this->quote_ident($wgDBmwschema);
                        $safeschema2 = $this->quote_ident($wgDBts2schema);
-                       $this->doQuery("SET search_path = $safeschema, $wgDBts2schema, public");
+                       $this->doQuery( "SET search_path = $safeschema, $wgDBts2schema, public" );
                }
 
                return $this->mConn;