X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Flogin.pl;h=72032f3df8a573bdf0c30cf0992077ec59865f3e;hb=d6bf475aee947e7451eb9b797ed0ad5ab5bcf6f8;hp=cea155976c98b9ebda3d1ab9e62d654745e909b7;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git
diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl
index cea155976..72032f3df 100644
--- a/bin/mozilla/login.pl
+++ b/bin/mozilla/login.pl
@@ -31,19 +31,21 @@ use DBI;
use SL::User;
use SL::Form;
+require "bin/mozilla/common.pl";
+
$form = new Form;
$locale = new Locale $language, "login";
# customization
-if (-f "$form->{path}/custom_$form->{script}") {
- eval { require "$form->{path}/custom_$form->{script}"; };
+if (-f "bin/mozilla/custom_$form->{script}") {
+ eval { require "bin/mozilla/custom_$form->{script}"; };
$form->error($@) if ($@);
}
# per login customization
-if (-f "$form->{path}/$form->{login}_$form->{script}") {
- eval { require "$form->{path}/$form->{login}_$form->{script}"; };
+if (-f "bin/mozilla/$form->{login}_$form->{script}") {
+ eval { require "bin/mozilla/$form->{login}_$form->{script}"; };
$form->error($@) if ($@);
}
@@ -53,7 +55,7 @@ $form->{titlebar} =
if ($form->{action}) {
$form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
- &{ $locale->findsub($form->{action}) };
+ call_sub($locale->findsub($form->{action}));
} else {
&login_screen;
}
@@ -84,14 +86,15 @@ sub login_screen {
|
- . $locale->text('Version')
- . qq| $form->{version}
+ . $locale->text('Version') . qq| $form->{version}
|
@@ -141,11 +143,6 @@ sub login {
$err[1] = $err[3] = $locale->text('Incorrect username or password!');
if ($errno == 2) {
-
- # upgraded dataset, login again
- $form->redirect(
- "{login}&password=$form->{password}&path=$form->{path}&action=display>Continue"
- );
exit;
}
@@ -153,8 +150,16 @@ sub login {
}
# made it this far, execute the menu
- $form->{callback} =
- "menu.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
+ if ($user->{menustyle} eq "v3") {
+ $form->{callback} =
+ "menuv3.pl?login=$form->{login}&password=$form->{password}&action=display";
+ } elsif ($user->{menustyle} eq "neu") {
+ $form->{callback} =
+ "menunew.pl?login=$form->{login}&password=$form->{password}&action=display";
+ } else {
+ $form->{callback} =
+ "menu.pl?login=$form->{login}&password=$form->{password}&action=display";
+ }
$form->redirect;
@@ -167,7 +172,7 @@ sub logout {
unlink "$userspath/$form->{login}.conf";
# remove the callback to display the message
- $form->{callback} = "login.pl?path=$form->{path}&action=&login=";
+ $form->{callback} = "login.pl?action=&login=";
$form->redirect($locale->text('You are logged out!'));
$lxdebug->leave_sub();
@@ -183,7 +188,7 @@ sub company_logo {
$myconfig{address} =~ s/\\n/
/g;
$myconfig{dbhost} = $locale->text('localhost') unless $myconfig{dbhost};
- map { $form->{$_} = $myconfig{$_} } qw(charset stylesheet);
+ $form->{stylesheet} = $myconfig{stylesheet};
$form->{title} = $locale->text('About');