summaryrefslogtreecommitdiff
path: root/bin/login.pl
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-24 00:01:16 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-24 00:01:16 +0000
commitc3c9871298597e417d67f691fca24cd913ef802a (patch)
treec743f476ab241b97069518fbd90f89a1f2ae5f00 /bin/login.pl
parent0dc5b99d6e3bd63c2e20e131b39b38503add2dc0 (diff)
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
Diffstat (limited to 'bin/login.pl')
-rwxr-xr-xbin/login.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/login.pl b/bin/login.pl
index c52c3b9e..a3a70b9b 100755
--- a/bin/login.pl
+++ b/bin/login.pl
@@ -47,7 +47,7 @@ use LedgerSMB::Locale;
$form = new Form;
-$locale = LedgerSMB::Locale->get_handle($language);
+$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language});
$locale->encoding('UTF-8');
$form->{charset} = 'UTF-8';
#$form->{charset} = $locale->encoding;
@@ -235,7 +235,7 @@ sub login {
$form->error($locale->text('You did not enter a name!')) unless ($form->{login});
if (! $form->{beenthere}) {
- open(FH, "$memberfile") or $form->error("$memberfile : $!");
+ open(FH, "${LedgerSMB::Sysconfig::memberfile}") or $form->error("$memberfile : $!");
@a = <FH>;
close(FH);
@@ -262,10 +262,10 @@ sub login {
}
- $user = new User $memberfile, $form->{login};
+ $user = new User ${LedgerSMB::Sysconfig::memberfile}, $form->{login};
# if we get an error back, bale out
- if (($errno = $user->login(\%$form, $userspath)) <= -1) {
+ if (($errno = $user->login(\%$form, ${LedgerSMB::Sysconfig::userspath})) <= -1) {
$errno *= -1;
$err[1] = $locale->text('Access Denied!');
@@ -274,7 +274,7 @@ sub login {
if ($errno == 4) {
# upgrade dataset and log in again
- open FH, ">$userspath/nologin" or $form->error($!);
+ open FH, ">${LedgerSMB::Sysconfig::userspath}/nologin" or $form->error($!);
for (qw(dbname dbhost dbport dbdriver dbuser dbpasswd)) { $form->{$_} = $user->{$_} }
@@ -293,7 +293,7 @@ sub login {
$user->dbupdate(\%$form);
# remove lock file
- unlink "$userspath/nologin";
+ unlink "${LedgerSMB::Sysconfig::userspath}/nologin";
print $locale->text('done');