From a0d77095754b149d558d4ca627e78f640eb12cf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 23 Jul 2010 12:15:38 +0200 Subject: [PATCH] Bugfix: Locales in company_logo und kopf.pl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit login.pl und kopf.pl werden speziell dispatcht und müssen ihre eigenen user locales initialisieren. --- bin/mozilla/kopf.pl | 2 ++ bin/mozilla/login.pl | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/kopf.pl b/bin/mozilla/kopf.pl index 47e4f9d35..8f12b6191 100644 --- a/bin/mozilla/kopf.pl +++ b/bin/mozilla/kopf.pl @@ -9,6 +9,8 @@ use strict; sub run { my $session_result = shift; + %::myconfig = $::auth->read_user($::form->{login}) if $::form->{login}; + $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; my $form = $main::form; my $locale = $main::locale; diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index b04adc21e..072432aff 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -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))) { + if (!$::myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) { $form->{error_message} = $::locale->text('Incorrect 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 { -- 2.20.1