X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FForm.pm;h=2dcd31f7c386b269e2c05ac53757ce8008f40f61;hb=5547891f42ef3b13d477eba65bb0537ece1d703c;hp=dc0316841c699916acc4cb129a4b3d04ad5d97dc;hpb=b6aa691e35aafda0ea25410b326e92b1216ad247;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index dc0316841..2dcd31f7c 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -48,6 +48,7 @@ use SL::Auth; use SL::Auth::DB; use SL::Auth::LDAP; use SL::AM; +use SL::DB; use SL::Common; use SL::DBUtils; use SL::Mailer; @@ -263,9 +264,6 @@ sub new { _recode_recursively(SL::Iconv->new($encoding, $db_charset), $self); - $self->{action} = lc $self->{action}; - $self->{action} =~ s/( |-|,|\#)/_/g; - #$self->{version} = "2.6.1"; # Old hardcoded but secure style open VERSION_FILE, "VERSION"; # New but flexible code reads version from VERSION-file $self->{version} = ; @@ -594,20 +592,21 @@ sub create_http_response { pop @segments; $uri->path_segments(@segments); - my $session_cookie_value = $main::auth->get_session_id(); - $session_cookie_value ||= 'NO_SESSION'; + my $session_cookie_value = $main::auth->get_session_id(); - $session_cookie = $cgi->cookie('-name' => $main::auth->get_session_cookie_name(), - '-value' => $session_cookie_value, - '-path' => $uri->path, - '-secure' => $ENV{HTTPS}); + if ($session_cookie_value) { + $session_cookie = $cgi->cookie('-name' => $main::auth->get_session_cookie_name(), + '-value' => $session_cookie_value, + '-path' => $uri->path, + '-secure' => $ENV{HTTPS}); + } } my %cgi_params = ('-type' => $params{content_type}); $cgi_params{'-charset'} = $params{charset} if ($params{charset}); + $cgi_params{'-cookie'} = $session_cookie if ($session_cookie); - my $output = $cgi->header('-cookie' => $session_cookie, - %cgi_params); + my $output = $cgi->header(%cgi_params); $main::lxdebug->leave_sub(); @@ -764,9 +763,8 @@ sub _prepare_html_template { $file = "templates/webpages/${file}.html"; } else { - my $info = "Web page template '${file}' not found.\n" . - "Please re-run 'locales.pl' in 'locale/${language}'."; - print(qq|
$info
|); + my $info = "Web page template '${file}' not found.\n"; + print qq|
$info
|; ::end_of_request(); } @@ -1583,7 +1581,7 @@ sub get_standard_dbh { undef $standard_dbh; } - $standard_dbh ||= $self->dbconnect_noauto($myconfig); + $standard_dbh ||= SL::DB::create->dbh; $main::lxdebug->leave_sub(2);