[phpBB] svn: r190 - in trunk/phpbb2: . patches

kink at wolffelaar.nl kink at wolffelaar.nl
Tue Mar 29 23:08:01 CEST 2005


Author: kink
Date: 2005-03-29 23:07:49 +0200 (Tue, 29 Mar 2005)
New Revision: 190

Added:
   trunk/phpbb2/patches/030_fix_pgsql_client_encoding.diff
Modified:
   trunk/phpbb2/changelog
Log:
  * Set the correct client encoding for PostgreSQL servers, so it uses the
    same charset as the webserver does. Patch from Peter Palfrader.
    (Closes: #298580)


Modified: trunk/phpbb2/changelog
===================================================================
--- trunk/phpbb2/changelog	2005-03-29 20:43:44 UTC (rev 189)
+++ trunk/phpbb2/changelog	2005-03-29 21:07:49 UTC (rev 190)
@@ -2,6 +2,9 @@
 
   * Add README.multiboard: documentation for setting up multible boards on
     the same host (Closes: #298918)
+  * Set the correct client encoding for PostgreSQL servers, so it uses the
+    same charset as the webserver does. Patch from Peter Palfrader.
+    (Closes: #298580)
 
  -- Jeroen van Wolffelaar <jeroen at wolffelaar.nl>  Tue, 29 Mar 2005 22:20:53 +0200
 

Added: trunk/phpbb2/patches/030_fix_pgsql_client_encoding.diff
===================================================================
--- trunk/phpbb2/patches/030_fix_pgsql_client_encoding.diff	2005-03-29 20:43:44 UTC (rev 189)
+++ trunk/phpbb2/patches/030_fix_pgsql_client_encoding.diff	2005-03-29 21:07:49 UTC (rev 190)
@@ -0,0 +1,17 @@
+diff -ur phpBB2.old/db/postgres7.php phpBB2/db/postgres7.php
+--- phpBB2.old/db/postgres7.php	2005-03-29 22:53:12.602860000 +0200
++++ phpBB2/db/postgres7.php	2005-03-29 23:01:37.497104840 +0200
+@@ -84,6 +84,12 @@
+ 
+ 		$this->persistency = $persistency;
+ 
++		# Use the same encoding for our connection to the DB as we do for talking with
++		# clients.  That allows us to pass in user input containing non-ascii chars into
++		# the database properly.
++		$encoding = ini_get ( 'default_charset' );
++		pg_set_client_encoding ( $this->db_connect_id, $encoding );
++
+ 		$this->db_connect_id = ( $this->persistency ) ? pg_pconnect($this->connect_string) : pg_connect($this->connect_string);
+ 
+ 		return ( $this->db_connect_id ) ? $this->db_connect_id : false;
+Only in phpBB2.old/install/schemas: index.htm





More information about the phpBB-l mailing list