packages: phorum/unhide-errors.patch - bugfix: do not attempt to set charse...

glen glen at pld-linux.org
Sun Apr 17 22:11:42 CEST 2011


Author: glen                         Date: Sun Apr 17 20:11:42 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- bugfix: do not attempt to set charset when no db connection was established

---- Files affected:
packages/phorum:
   unhide-errors.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/phorum/unhide-errors.patch
diff -u packages/phorum/unhide-errors.patch:1.1 packages/phorum/unhide-errors.patch:1.2
--- packages/phorum/unhide-errors.patch:1.1	Tue Feb  1 15:23:13 2011
+++ packages/phorum/unhide-errors.patch	Sun Apr 17 22:11:37 2011
@@ -9,3 +9,23 @@
                      $PHORUM['DBCONFIG']['server'],
                      $PHORUM['DBCONFIG']['user'],
                      $PHORUM['DBCONFIG']['password'],
+--- phorum/include/db/mysql/mysqli_replication.php.original	2011-01-27 13:25:29.000000000 +0200
++++ phorum/include/db/mysql/mysqli_replication.php	2011-04-11 13:34:43.832383910 +0300
+@@ -98,7 +98,7 @@
+ 
+             $conn_read = phorum_db_get_random_connection($PHORUM['DBCONFIG']['slaves']);
+ 
+-            if(!empty($PHORUM['DBCONFIG']['charset'])) {
++            if($conn_read && !empty($PHORUM['DBCONFIG']['charset'])) {
+                 mysqli_query( $conn_read,"SET NAMES '{$PHORUM['DBCONFIG']['charset']}'");
+             }
+         }
+@@ -129,7 +129,7 @@
+                     );
+             }
+ 
+-            if(!empty($PHORUM['DBCONFIG']['charset'])) {
++            if($conn_write && !empty($PHORUM['DBCONFIG']['charset'])) {
+                 mysqli_query( $conn_write,"SET NAMES '{$PHORUM['DBCONFIG']['charset']}'");
+             }
+         }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/phorum/unhide-errors.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list