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

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



Revision: 381
          http://svn.sourceforge.net/ledger-smb/?rev=381&view=rev
Author:   tetragon
Date:     2006-10-29 20:07:28 -0800 (Sun, 29 Oct 2006)

Log Message:
-----------
Convert main configuration to using LedgerSMB::Sysconfig

Modified Paths:
--------------
    trunk/admin.pl
    trunk/login.pl
    trunk/menu.pl

Modified: trunk/admin.pl
===================================================================
--- trunk/admin.pl	2006-10-30 03:33:05 UTC (rev 380)
+++ trunk/admin.pl	2006-10-30 04:07:28 UTC (rev 381)
@@ -48,21 +48,10 @@
 #
 #######################################################################
 
+use LedgerSMB::Sysconfig;
 
-# setup defaults, DO NOT CHANGE
-$userspath = "users";
-$spool = "spool";
-${LedgerSMB::Sysconfig::templates} = "templates";
-$memberfile = "users/members";
-$sendmail = "| /usr/sbin/sendmail -t";
-%printer = ( Printer => 'lpr' );
-########## end ###########################################
-
-
 $| = 1;
 
-eval { require "ledger-smb.conf"; };
-
 if ($ENV{CONTENT_LENGTH}) {
 	read(STDIN, $_, $ENV{CONTENT_LENGTH});
 }
@@ -87,7 +76,7 @@
 $script = substr($0, $pos + 1);
 
 
-if (-e "$userspath/nologin" && $script ne 'admin.pl') {
+if (-e "${LedgerSMB::Sysconfig::userspath}/nologin" && $script ne 'admin.pl') {
 	print "Content-Type: text/html\n\n<html><body><strong>";
 	print "\nLogin disabled!\n";
 	print "\n</strong></body></html>";

Modified: trunk/login.pl
===================================================================
--- trunk/login.pl	2006-10-30 03:33:05 UTC (rev 380)
+++ trunk/login.pl	2006-10-30 04:07:28 UTC (rev 381)
@@ -49,21 +49,10 @@
 #
 #######################################################################
 
+use LedgerSMB::Sysconfig;
 
-# setup defaults, DO NOT CHANGE
-$userspath = "users";
-$spool = "spool";
-${LedgerSMB::Sysconfig::templates} = "templates";
-$memberfile = "users/members";
-$sendmail = "| /usr/sbin/sendmail -t";
-%printer = ( Printer => 'lpr' );
-########## end ###########################################
-
-
 $| = 1;
 
-eval { require "ledger-smb.conf"; };
-
 if ($ENV{CONTENT_LENGTH}) {
 	read(STDIN, $_, $ENV{CONTENT_LENGTH});
 }
@@ -88,7 +77,7 @@
 $script = substr($0, $pos + 1);
 
 
-if (-e "$userspath/nologin" && $script ne 'admin.pl') {
+if (-e "${LedgerSMB::Sysconfig::userspath}/nologin" && $script ne 'admin.pl') {
 	print "Content-Type: text/html\n\n<html><body><strong>";
 	print "\nLogin disabled!\n";
 	print "\n</strong></body></html>";

Modified: trunk/menu.pl
===================================================================
--- trunk/menu.pl	2006-10-30 03:33:05 UTC (rev 380)
+++ trunk/menu.pl	2006-10-30 04:07:28 UTC (rev 381)
@@ -46,25 +46,14 @@
 #
 #######################################################################
 
-# setup defaults, DO NOT CHANGE
-$userspath = "users";
-$spool = "spool";
-${LedgerSMB::Sysconfig::templates} = "templates";
-$memberfile = "users/members";
-$sendmail = "| /usr/sbin/sendmail -t";
-$latex = 0;
-%printer = ();
-########## end ###########################################
+use LedgerSMB::Sysconfig;
 
-
 $| = 1;
 
 use LedgerSMB::Form;
 use LedgerSMB::Locale;
 use LedgerSMB::Session;
 
-eval { require "ledger-smb.conf"; };
-
 # for custom preprocessing logic
 eval { require "custom.pl"; };
 
@@ -85,7 +74,7 @@
 use DBI qw(:sql_types);
 
 # check for user config file, could be missing or ???
-eval { require("$userspath/$form->{login}.conf"); };
+eval { require("${LedgerSMB::Sysconfig::userspath}/$form->{login}.conf"); };
 if ($@) {
 	$locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}) or
 		$form->error("Locale not loaded: $!\n");
@@ -119,7 +108,7 @@
 if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';}	
 
 # did sysadmin lock us out
-if (-f "$userspath/nologin") {
+if (-f "${LedgerSMB::Sysconfig::userspath}/nologin") {
 	$form->error($locale->text('System currently down for maintenance!'));
 }
 


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