[Fusionforge-commits] r7375 - in branches/Branch_4_7/gforge: debian utils

Roland Mas lolando at libremir.placard.fr.eu.org
Wed Apr 8 11:09:37 CEST 2009


Author: lolando
Date: 2009-04-08 11:09:37 +0200 (Wed, 08 Apr 2009)
New Revision: 7375

Modified:
   branches/Branch_4_7/gforge/debian/changelog
   branches/Branch_4_7/gforge/utils/include.pl
Log:
Use Unix sockets to connect to the DB in the Perl scripts.

Modified: branches/Branch_4_7/gforge/debian/changelog
===================================================================
--- branches/Branch_4_7/gforge/debian/changelog	2009-04-07 21:20:38 UTC (rev 7374)
+++ branches/Branch_4_7/gforge/debian/changelog	2009-04-08 09:09:37 UTC (rev 7375)
@@ -1,3 +1,9 @@
+gforge (4.7.2-5+1) experimental; urgency=low
+
+  * Use Unix sockets to connect to the DB in the Perl scripts.
+
+ -- Roland Mas <lolando at debian.org>  Wed, 08 Apr 2009 11:08:52 +0200
+
 gforge (4.7.2-5) experimental; urgency=low
 
   * Small tweak in fr.po to fix links to statistics and project reporting

Modified: branches/Branch_4_7/gforge/utils/include.pl
===================================================================
--- branches/Branch_4_7/gforge/utils/include.pl	2009-04-07 21:20:38 UTC (rev 7374)
+++ branches/Branch_4_7/gforge/utils/include.pl	2009-04-08 09:09:37 UTC (rev 7375)
@@ -34,7 +34,11 @@
 sub db_connect ( ) {
     &parse_local_inc;
 
-    $dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname;host=$sys_dbhost","$sys_dbuser","$sys_dbpasswd") ;
+    if ((defined $sys_dbhost) && ($sys_dbhost ne '')) {
+	$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname;host=$sys_dbhost","$sys_dbuser","$sys_dbpasswd") ;
+    } else {
+	$dbh ||= DBI->connect("DBI:Pg:dbname=$sys_dbname","$sys_dbuser","$sys_dbpasswd") ;
+    }	
     if (! $dbh) {
 	die "Error while connecting to database: $!" ;
     }




More information about the Fusionforge-commits mailing list