summaryrefslogtreecommitdiff
path: root/LedgerSMB/Sysconfig.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
commit666fd833584fe2e3618a397fe9d9a9bdf4c5b94b (patch)
tree19c4444705fd7f7803e0d7b597659c11d7e85b73 /LedgerSMB/Sysconfig.pm
parent2edd2e4de0f08a0a5f23647ea715f279671a0b89 (diff)
Doing a simple Perltidy commit so that I can evaluate differences between the branches and make sure patches are up to date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1103 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Sysconfig.pm')
-rw-r--r--LedgerSMB/Sysconfig.pm89
1 files changed, 49 insertions, 40 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm
index bfb9c890..361f3c6b 100644
--- a/LedgerSMB/Sysconfig.pm
+++ b/LedgerSMB/Sysconfig.pm
@@ -1,4 +1,4 @@
-# This is the new configuration file for LedgerSMB. Eventually all system
+# This is the new configuration file for LedgerSMB. Eventually all system
# configuration directives will go here, This will probably not fully replace
# the ledger-smb.conf until 1.3, however.
@@ -6,23 +6,28 @@ package LedgerSMB::Sysconfig;
use LedgerSMB::Form;
use Config::Std;
-use DBI qw(:sql_types);
+use DBI qw(:sql_types);
binmode STDOUT, ':utf8';
# For Win32, change $pathsep to ';';
-$pathsep=':';
+$pathsep = ':';
-$session='DB';
-$logging=0; # No logging on by default
+$session = 'DB';
+$logging = 0; # No logging on by default
@io_lineitem_columns = qw(unit onhand sellprice discount linetotal);
# Whitelist for redirect destination
-@scripts = ('aa.pl', 'admin.pl', 'am.pl', 'ap.pl', 'ar.pl', 'arap.pl',
- 'arapprn.pl', 'bp.pl', 'ca.pl', 'cp.pl', 'ct.pl', 'gl.pl', 'hr.pl',
- 'ic.pl', 'io.pl', 'ir.pl', 'is.pl', 'jc.pl', 'login.pl', 'menu.pl',
- 'oe.pl', 'pe.pl', 'pos.pl', 'ps.pl', 'pw.pl', 'rc.pl', 'rp.pl');
+@scripts = (
+ 'aa.pl', 'admin.pl', 'am.pl', 'ap.pl',
+ 'ar.pl', 'arap.pl', 'arapprn.pl', 'bp.pl',
+ 'ca.pl', 'cp.pl', 'ct.pl', 'gl.pl',
+ 'hr.pl', 'ic.pl', 'io.pl', 'ir.pl',
+ 'is.pl', 'jc.pl', 'login.pl', 'menu.pl',
+ 'oe.pl', 'pe.pl', 'pos.pl', 'ps.pl',
+ 'pw.pl', 'rc.pl', 'rp.pl'
+);
# if you have latex installed set to 1
$latex = 1;
@@ -46,7 +51,7 @@ $memberfile = "users/members";
$sendmail = "/usr/sbin/sendmail -t";
# SMTP settings
-$smtphost = '';
+$smtphost = '';
$smtptimout = 60;
# set language for login and admin
@@ -62,64 +67,68 @@ $gzip = "gzip -S .gz";
$localepath = 'locale/po';
# available printers
-%printer = ( Laser => 'lpr -Plaser',
- Epson => 'lpr -PEpson',
- );
+%printer = (
+ Laser => 'lpr -Plaser',
+ Epson => 'lpr -PEpson',
+);
my %config;
-read_config('ledgersmb.conf' => %config) or die;
+read_config( 'ledgersmb.conf' => %config ) or die;
# Root variables
-for $var (qw(pathsep logging check_max_invoices language session latex
- db_autoupdate)){
+for $var (
+ qw(pathsep logging check_max_invoices language session latex
+ db_autoupdate)
+ )
+{
${$var} = $config{''}{$var} if $config{''}{$var};
}
-%printer = %{$config{printers}} if $config{printers};
+%printer = %{ $config{printers} } if $config{printers};
# ENV Paths
-for $var (qw(PATH PERL5LIB)){
-$ENV{$var} .= $pathsep.(join $pathsep, @{$config{environment}{$var}}) if
- $config{environment}{$var};
+for $var (qw(PATH PERL5LIB)) {
+ $ENV{$var} .= $pathsep . ( join $pathsep, @{ $config{environment}{$var} } )
+ if $config{environment}{$var};
}
# Application-specific paths
-for $var (qw(localepath spool templates images)){
- ${$var} = $config{paths}{$var} if $config{paths}{$var};
+for $var (qw(localepath spool templates images)) {
+ ${$var} = $config{paths}{$var} if $config{paths}{$var};
}
# Programs
-for $var (qw(gzip)){
- ${$var} = $config{programs}{$var} if $config{programs}{$var};
+for $var (qw(gzip)) {
+ ${$var} = $config{programs}{$var} if $config{programs}{$var};
}
# mail configuration
-for $var (qw(sendmail smpthost smtptimeout)){
- ${$var} = $config{mail}{$var} if $config{mail}{$var};
+for $var (qw(sendmail smpthost smtptimeout)) {
+ ${$var} = $config{mail}{$var} if $config{mail}{$var};
}
-
# We used to have a global dbconnect but have moved to single entries
-for $var (qw(DBhost DBport DBname DBUserName DBPassword)){
- ${"global".$var} = $config{globaldb}{$var} if $config{globaldb}{$var};
+for $var (qw(DBhost DBport DBname DBUserName DBPassword)) {
+ ${ "global" . $var } = $config{globaldb}{$var} if $config{globaldb}{$var};
}
#putting this in an if clause for now so not to break other devel users
-if ($config{globaldb}{DBname}){
- my $dbconnect = "dbi:Pg:dbname=$globalDBname host=$globalDBhost
+if ( $config{globaldb}{DBname} ) {
+ my $dbconnect = "dbi:Pg:dbname=$globalDBname host=$globalDBhost
port=$globalDBport user=$globalDBUserName
- password=$globalDBPassword"; # for easier debugging
- $GLOBALDBH = DBI->connect($dbconnect);
- if (!$GLOBALDBH){
- $form = new Form;
- $form->error("No GlobalDBH Configured or Could not Connect");
- }
+ password=$globalDBPassword"; # for easier debugging
+ $GLOBALDBH = DBI->connect($dbconnect);
+ if ( !$GLOBALDBH ) {
+ $form = new Form;
+ $form->error("No GlobalDBH Configured or Could not Connect");
+ }
}
-# These lines prevent other apps in mod_perl from seeing the global db
+
+# These lines prevent other apps in mod_perl from seeing the global db
# connection info
my $globalDBConnect = undef;
-my $globalUserName = undef;
-my $globalPassword = undef;
+my $globalUserName = undef;
+my $globalPassword = undef;
1;