SOURCES: drupal-emptypass.patch - work with replication patch

glen glen at pld-linux.org
Mon Aug 15 15:26:12 CEST 2005


Author: glen                         Date: Mon Aug 15 13:26:12 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- work with replication patch

---- Files affected:
SOURCES:
   drupal-emptypass.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/drupal-emptypass.patch
diff -u SOURCES/drupal-emptypass.patch:1.1 SOURCES/drupal-emptypass.patch:1.2
--- SOURCES/drupal-emptypass.patch:1.1	Thu May 19 17:42:18 2005
+++ SOURCES/drupal-emptypass.patch	Mon Aug 15 15:26:07 2005
@@ -1,11 +1,23 @@
---- ./includes/database.mysql.inc~	2005-04-14 21:50:23.000000000 +0300
-+++ ./includes/database.mysql.inc	2005-05-18 18:48:24.970031862 +0300
-@@ -28,7 +28,7 @@
-      $url['host'] = $url['host'] .':'. $url['port'];
+# without replication patch:
+#--- ./includes/database.mysql.inc~	2005-04-14 21:50:23.000000000 +0300
+#+++ ./includes/database.mysql.inc	2005-05-18 18:48:24.970031862 +0300
+#@@ -28,7 +28,7 @@
+#      $url['host'] = $url['host'] .':'. $url['port'];
+#   }
+# 
+#-  $connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE) or die(mysql_error());
+#+  $connection = mysql_connect($url['host'], $url['user'], @$url['pass'], TRUE) or die(mysql_error());
+#   mysql_select_db(substr($url['path'], 1)) or die('unable to select database');
+# 
+#   return $connection;
+--- ./includes/database.mysql.inc~	2005-08-15 16:11:07.000000000 +0300
++++ ./includes/database.mysql.inc	2005-08-15 16:11:39.000000000 +0300
+@@ -29,7 +29,7 @@
    }
  
--  $connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE) or die(mysql_error());
-+  $connection = mysql_connect($url['host'], $url['user'], @$url['pass'], TRUE) or die(mysql_error());
-   mysql_select_db(substr($url['path'], 1)) or die('unable to select database');
- 
-   return $connection;
+   // For replication setups, we will assume that dieing is bad 
+-  $connection = mysql_pconnect($url['host'], $url['user'], $url['pass'], TRUE);
++  $connection = mysql_pconnect($url['host'], $url['user'], @$url['pass'], TRUE);
+   if(!is_resource($connection) && $critical) {
+     die(mysql_error());
+   }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/drupal-emptypass.patch?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list