From c3c9871298597e417d67f691fca24cd913ef802a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 24 Oct 2006 00:01:16 +0000 Subject: Moved all scalars out of ledger-smb.conf git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@268 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/aa.pl | 8 +++---- bin/admin.pl | 74 +++++++++++++++++++++++++++++----------------------------- bin/am.pl | 14 +++++------ bin/arap.pl | 2 +- bin/arapprn.pl | 18 +++++++------- bin/bp.pl | 12 +++++----- bin/cp.pl | 14 +++++------ bin/hr.pl | 4 ++-- bin/io.pl | 16 ++++++------- bin/is.pl | 6 ++--- bin/jc.pl | 18 +++++++------- bin/login.pl | 12 +++++----- bin/oe.pl | 6 ++--- bin/pe.pl | 2 +- bin/pos.pl | 4 ++-- bin/rp.pl | 10 ++++---- 16 files changed, 110 insertions(+), 110 deletions(-) (limited to 'bin') diff --git a/bin/aa.pl b/bin/aa.pl index c6e32fed..e173f678 100755 --- a/bin/aa.pl +++ b/bin/aa.pl @@ -132,7 +132,7 @@ sub create_links { $form->{selectformname} = qq|\n$countrycodes|; # is there a templates basedir - if (! -d "$templates") { - $form->error($locale->text('Directory').": $templates ".$locale->text('does not exist')); + if (! -d "${LedgerSMB::Sysconfig::templates}") { + $form->error($locale->text('Directory').": ${LedgerSMB::Sysconfig::templates} ".$locale->text('does not exist')); } - opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!"); + opendir TEMPLATEDIR, "${LedgerSMB::Sysconfig::templates}/." or $form->error("$templates : $!"); @all = grep !/^\.\.?$/, readdir TEMPLATEDIR; closedir TEMPLATEDIR; @@ -417,7 +417,7 @@ sub form_header { @alldir = (); for (@all) { - if (-d "$templates/$_") { + if (-d "${LedgerSMB::Sysconfig::templates}/$_") { push @alldir, $_; } } @@ -464,7 +464,7 @@ sub form_header { $selectstylesheet .= "\n"; - if (%printer && $latex) { + if (%printer && ${LedgerSMB::Sysconfig::latex}) { $selectprinter = "\n"; @@ -770,7 +770,7 @@ sub save { # check for duplicates if (!$form->{edit}) { - $temp = new User "$memberfile", "$form->{login}"; + $temp = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}"; if ($temp->{login}) { $form->error("$form->{login} ".$locale->text('is already a member!')); @@ -787,15 +787,15 @@ sub save { } # is there a basedir - if (! -d "$templates") { - $form->error($locale->text('Directory').": $templates ".$locale->text('does not exist')); + if (! -d "${LedgerSMB::Sysconfig::templates}") { + $form->error($locale->text('Directory').": ${LedgerSMB::Sysconfig::templates} ".$locale->text('does not exist')); } # add base directory to $form->{templates} - $form->{templates} = "$templates/$form->{templates}"; + $form->{templates} = "${LedgerSMB::Sysconfig::templates}/$form->{templates}"; - $myconfig = new User "$memberfile", "$form->{login}"; + $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}"; # redo acs variable and delete all the acs codes @acs = split /;/, $form->{acs}; @@ -838,7 +838,7 @@ sub save { $myconfig->{packpw} = 1; - $myconfig->save_member($memberfile, $userspath); + $myconfig->save_member(${LedgerSMB::Sysconfig::memberfile}, ${LedgerSMB::Sysconfig::userspath}); # create user template directory and copy master files if (! -d "$form->{templates}") { @@ -849,13 +849,13 @@ sub save { umask(007); # copy templates to the directory - opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!"); + opendir TEMPLATEDIR, "${LedgerSMB::Sysconfig::templates}/." or $form->error("$templates : $!"); @templates = grep /$form->{mastertemplates}-/, readdir TEMPLATEDIR; closedir TEMPLATEDIR; foreach $file (@templates) { - open(TEMP, "$templates/$file") or $form->error("$templates/$file : $!"); + open(TEMP, "${LedgerSMB::Sysconfig::templates}/$file") or $form->error("$templates/$file : $!"); $file =~ s/$form->{mastertemplates}-//; open(NEW, ">$form->{templates}/$file") or $form->error("$form->{templates}/$file : $!"); @@ -879,16 +879,16 @@ sub save { sub delete { - $form->{templates} = ($form->{templates}) ? "$templates/$form->{templates}" : "$templates/$form->{login}"; + $form->{templates} = ($form->{templates}) ? "${LedgerSMB::Sysconfig::templates}/$form->{templates}" : "$templates/$form->{login}"; - $form->error("$memberfile ".$locale->text('locked!')) if (-f ${memberfile}.LCK); + $form->error("${LedgerSMB::Sysconfig::memberfile} ".$locale->text('locked!')) if (-f ${memberfile}.LCK); open(FH, ">${memberfile}.LCK") or $form->error("${memberfile}.LCK : $!"); close(FH); - if (! open(CONF, "+<$memberfile")) { + if (! open(CONF, "+<${LedgerSMB::Sysconfig::memberfile}")) { unlink "${memberfile}.LCK"; - $form->error("$memberfile : $!"); + $form->error("${LedgerSMB::Sysconfig::memberfile} : $!"); } @config = ; @@ -972,7 +972,7 @@ sub delete { User->delete_login(\%$form); # delete config file for user - unlink "$userspath/$form->{login}.conf"; + unlink "${LedgerSMB::Sysconfig::userspath}/$form->{login}.conf"; } $form->redirect($locale->text('User deleted!')); @@ -1035,7 +1035,7 @@ sub change_password { $form->error($locale->text('Passwords do not match!')) if $form->{new_password} ne $form->{confirm_password}; $root->{password} = $form->{new_password}; $root->{'root login'} = 1; - $root->save_member($memberfile); + $root->save_member(${LedgerSMB::Sysconfig::memberfile}); $form->{callback} = "$form->{script}?action=list_users&path=$form->{path}&sessionid=$form->{sessionid}"; $form->redirect($locale->text('Password changed!')); } @@ -1048,7 +1048,7 @@ sub get_hash { sub check_password { - $root = new User "$memberfile", "root login"; + $root = new User "${LedgerSMB::Sysconfig::memberfile}", "root login"; if ($root->{password}) { @@ -1064,7 +1064,7 @@ sub check_password { &get_hash; - open(HASHFILE, "> $userspath/adminhash") || $form->error("Can't Open Hashfile: $!"); + open(HASHFILE, "> ${LedgerSMB::Sysconfig::userspath}/adminhash") || $form->error("Can't Open Hashfile: $!"); print HASHFILE $form->{hash}; print qq|Set-Cookie: LedgerSMB=$form->{hash}; path=/;\n|; @@ -1077,14 +1077,14 @@ sub check_password { $cookie = ($form->{path} eq 'bin/lynx') ? $cookie{login} : $cookie{"LedgerSMB-root login"}; #fixes problem with first login and such - if (!(-f "$userspath/adminhash")) { + if (!(-f "${LedgerSMB::Sysconfig::userspath}/adminhash")) { &get_hash; - open(HASHFILE, "> $userspath/adminhash") || $form->error("Can't Open Hashfile: $!"); + open(HASHFILE, "> ${LedgerSMB::Sysconfig::userspath}/adminhash") || $form->error("Can't Open Hashfile: $!"); print HASHFILE $form->{hash}; close(HASHFILE); } - open (HASHFILE, "< $userspath/adminhash") || $form->error("Can't Open Hashfile: $!"); + open (HASHFILE, "< ${LedgerSMB::Sysconfig::userspath}/adminhash") || $form->error("Can't Open Hashfile: $!"); chomp($form->{hash} = ); %cookies = split /[=;]/, $ENV{HTTP_COOKIE}; @@ -1372,7 +1372,7 @@ sub dbcreate { sub delete_dataset { - if (@dbsources = User->dbsources_unused(\%$form, $memberfile)) { + if (@dbsources = User->dbsources_unused(\%$form, ${LedgerSMB::Sysconfig::memberfile})) { foreach $item (sort @dbsources) { $dbsources .= qq| $item |; @@ -1463,7 +1463,7 @@ sub dbdelete { sub unlock_system { - unlink "$userspath/nologin"; + unlink "${LedgerSMB::Sysconfig::userspath}/nologin"; $form->{callback} = "$form->{script}?action=list_users&path=$form->{path}&sessionid=$form->{sessionid}"; $form->redirect($locale->text('Lockfile removed!')); } @@ -1471,7 +1471,7 @@ sub unlock_system { sub lock_system { - open(FH, ">$userspath/nologin") or $form->error($locale->text('Cannot create Lock!')); + open(FH, ">${LedgerSMB::Sysconfig::userspath}/nologin") or $form->error($locale->text('Cannot create Lock!')); close(FH); $form->{callback} = "$form->{script}?action=list_users&path=$form->{path}&sessionid=$form->{sessionid}"; $form->redirect($locale->text('Lockfile created!')); diff --git a/bin/am.pl b/bin/am.pl index cdc5959e..f51e029b 100755 --- a/bin/am.pl +++ b/bin/am.pl @@ -2064,7 +2064,7 @@ sub config { } $selectstylesheet .= "