Globale Variablen für Systemeinstellungen und Features nach %::lx_office_conf verschoben
[kivitendo-erp.git] / bin / mozilla / login.pl
index b04adc2..49cb6c6 100644 (file)
@@ -62,16 +62,17 @@ sub run {
     $action = 'login';
   }
   if ($action) {
-    our %myconfig = $auth->read_user($form->{login}) if ($form->{login});
+    %::myconfig = $auth->read_user($form->{login}) if ($form->{login});
+    $::locale   = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
 
-    if (!$myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) {
-      $form->{error_message} = $::locale->text('Incorrect Password!');
+    if (!$::myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) {
+      $form->{error_message} = $::locale->text('Incorrect username or password!');
       login_screen();
     } else {
       $auth->set_session_value('login', $form->{login}, 'password', $form->{password});
       $auth->create_or_refresh_session();
 
-      $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
+      $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
       call_sub($::locale->findsub($action));
     }
   } else {
@@ -161,7 +162,7 @@ sub company_logo {
   $form->{todo_list}  =  create_todo_list('login_screen' => 1) if (!$form->{no_todo_list});
 
   $form->{stylesheet} =  $myconfig{stylesheet};
-  $form->{title}      =  $::locale->text('About');
+  $form->{title}      =  $::locale->text('Lx-Office');
 
   # create the logo screen
   $form->header() unless $form->{noheader};
@@ -174,7 +175,7 @@ sub company_logo {
 sub show_error {
   my $template           = shift;
   my %myconfig           = %main::myconfig;
-  $myconfig{countrycode} = $main::language;
+  $myconfig{countrycode} = $::lx_office_conf{system}->{language};
   $form->{stylesheet}    = 'css/lx-office-erp.css';
 
   $form->header();