[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [426] trunk



Revision: 426
          http://svn.sourceforge.net/ledger-smb/?rev=426&view=rev
Author:   christopherm
Date:     2006-10-31 11:27:18 -0800 (Tue, 31 Oct 2006)

Log Message:
-----------
putting global db parameters into ledger-smb.conf file, updating LedgerSMB::Sysconfig. Lines are commented out so to not break current testing and development

Modified Paths:
--------------
    trunk/LedgerSMB/Sysconfig.pm
    trunk/ledger-smb.conf

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2006-10-31 19:19:15 UTC (rev 425)
+++ trunk/LedgerSMB/Sysconfig.pm	2006-10-31 19:27:18 UTC (rev 426)
@@ -5,7 +5,9 @@
 package LedgerSMB::Sysconfig;
 
 use Config::Std;
+use DBI qw(:sql_types); 
 
+
 $session='DB';
 $logging=0; # No logging on by default
 
@@ -46,15 +48,6 @@
              Epson	=> 'lpr -PEpson',
 	     );
 
-#################################
-# Global database parameters
-#################################
-# These parameters *must* be set correctly
-# for LedgerSMB >= 1.2 to work
-my $globalDBConnect = 'dbi:Pg:dbname=ledgersmb;host=localhost;port=5432';
-my $globalUserName = "ledgersmb";
-my $globalPassword = "set me to correct password";
-
 my %config;
 read_config('ledger-smb.conf' => %config) or die;
 
@@ -82,11 +75,13 @@
 $gzip = $config{programs}{gzip} if $config{programs}{gzip};
 
 $globalDBConnect = $config{globaldb}{DBConnect} if $config{globaldb}{DBConnect};
-$globalUserName = $config{globaldb}{UserName} if $config{globaldb}{UserName};
-$globalPassword = $config{globaldb}{Password} if $config{globaldb}{Password};
+$globalDBUserName = $config{globaldb}{DBUserName} if $config{globaldb}{DBUserName};
+$globalDBPassword = $config{globaldb}{DBPassword} if $config{globaldb}{DBPassword};
 
-#$GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, $globalDBPassword); 
-
+#putting this in an if clause for now so not to break other devel users
+if ($config{globaldb}{DBConnect}){
+	$GLOBALDBH = DBI->connect($globalDBConnect, $globalDBUserName, $globalDBPassword) or die;
+}
 # These lines prevent other apps in mod_perl from seeing the global db 
 # connection info
 

Modified: trunk/ledger-smb.conf
===================================================================
--- trunk/ledger-smb.conf	2006-10-31 19:19:15 UTC (rev 425)
+++ trunk/ledger-smb.conf	2006-10-31 19:27:18 UTC (rev 426)
@@ -6,3 +6,13 @@
 # on mac os X using Fink's Perl libs, add the path
 #PERL5LIB: /sw/lib/perl5
 
+#################################
+# Global database parameters
+#################################
+# These parameters *must* be set correctly for LedgerSMB >= 1.2 to work
+#
+[globaldb]
+##uncomment and set these
+#DBConnect: dbi:Pg:dbname=ledgersmb;host=localhost;port=5432
+#DBUserName: ledgersmb
+#DBPassword: password 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.