X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAuth.pm;h=f2d15a8c71d4bd5cf59920fdcd2e4aeb31f424f2;hb=89c9ff022d3f13e27ba6bda085df15707fcfb0eb;hp=a11fbafb0d815472c8a3cfbcee3e75bcfca9f589;hpb=25652024d1f0309cf7817ee66d412e468435badf;p=kivitendo-erp.git diff --git a/SL/Auth.pm b/SL/Auth.pm index a11fbafb0..f2d15a8c7 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -13,6 +13,7 @@ use SL::Auth::DB; use SL::Auth::LDAP; use SL::User; +use SL::DBUpgrade2; use SL::DBUtils; use strict; @@ -256,7 +257,7 @@ sub create_database { $main::lxdebug->message(LXDebug->DEBUG1(), "Auth::create_database DSN: $dsn"); - my $charset = $main::dbcharset; + my $charset = $::lx_office_conf{system}->{dbcharset}; $charset ||= Common::DEFAULT_CHARSET; my $encoding = $Common::charset_to_db_encoding{$charset}; $encoding ||= 'UNICODE'; @@ -299,11 +300,11 @@ sub create_tables { my $self = shift; my $dbh = $self->dbconnect(); - my $charset = $main::dbcharset; + my $charset = $::lx_office_conf{system}->{dbcharset}; $charset ||= Common::DEFAULT_CHARSET; $dbh->rollback(); - User->process_query($main::form, $dbh, 'sql/auth_db.sql', undef, $charset); + SL::DBUpgrade2->new(form => $::form)->process_query($dbh, 'sql/auth_db.sql', undef, $charset); $main::lxdebug->leave_sub(); } @@ -489,7 +490,7 @@ sub restore_session { if (!$cookie || $cookie->{is_expired} || ($cookie->{ip_address} ne $ENV{REMOTE_ADDR})) { $self->destroy_session(); $main::lxdebug->leave_sub(); - return SESSION_EXPIRED; + return $cookie ? SESSION_EXPIRED : SESSION_NONE; } $query = qq|SELECT sess_key, sess_value FROM auth.session_content WHERE session_id = ?|;