From aedecad9fb390118e16be424e2b546b488ab9083 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 17 Mar 2007 19:58:39 +0000 Subject: ?path=/bin/lynx now works in the login but the lynx menus need some real help... git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@926 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/login.pl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/login.pl b/bin/login.pl index d1fa5202..0caf8114 100755 --- a/bin/login.pl +++ b/bin/login.pl @@ -48,6 +48,24 @@ use LedgerSMB::Session; $form = new Form; +# For 1.3, this logic should be in LedgerSMB.pm +if ($form->{path}) { + + if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';} + +} else { + + $form->{terminal} = "lynx"; + + if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) { + $form->{terminal} = "mozilla"; + } + + $form->{path} = "bin/$form->{terminal}"; + + +} + $locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language}) or $form->error(__FILE__.':'.__LINE__.": Locale not loaded: $!\n"); $locale->encoding('UTF-8'); @@ -129,7 +147,7 @@ sub login_screen { LedgerSMB Logo

|.$locale->text('Version').qq| $form->{version}

-

+
@@ -230,12 +248,12 @@ sub selectdataset { sub login { - $form->{stylesheet} = "ledger-smb.css"; $form->{favicon} = "favicon.ico"; $form->error(__FILE__.':'.__LINE__.': '.$locale->text('You did not enter a name!')) unless ($form->{login}); + #this needs to be done via db #if (! $form->{beenthere}) { # open(FH, '<', "${LedgerSMB::Sysconfig::memberfile}") or $form->error(__FILE__.':'.__LINE__.": $memberfile : $!"); -- cgit v1.2.3