Revision 2ecce44c
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
604 | 604 |
|
605 | 605 |
} |
606 | 606 |
|
607 |
$query = qq|INSERT INTO auth.session_content (session_id, sess_key, sess_value) VALUES (?, ?, ?)|; |
|
608 |
$sth = prepare_query($form, $dbh, $query); |
|
607 |
$self->save_session($dbh); |
|
608 |
|
|
609 |
$dbh->commit(); |
|
610 |
|
|
611 |
$main::lxdebug->leave_sub(); |
|
612 |
} |
|
613 |
|
|
614 |
sub save_session { |
|
615 |
my $self = shift; |
|
616 |
my $provided_dbh = shift; |
|
617 |
|
|
618 |
my $dbh = $provided_dbh || $self->dbconnect(); |
|
619 |
|
|
620 |
my $query = qq|INSERT INTO auth.session_content (session_id, sess_key, sess_value) VALUES (?, ?, ?)|; |
|
621 |
my $sth = prepare_query($::form, $dbh, $query); |
|
609 | 622 |
|
610 | 623 |
foreach my $key (sort keys %{ $self->{SESSION} }) { |
611 |
do_statement($form, $sth, $query, $session_id, $key, $self->{SESSION}->{$key}); |
|
624 |
do_statement($::form, $sth, $query, $session_id, $key, $self->{SESSION}->{$key});
|
|
612 | 625 |
} |
613 | 626 |
|
614 | 627 |
$sth->finish(); |
615 |
$dbh->commit(); |
|
616 |
|
|
617 |
$main::lxdebug->leave_sub(); |
|
618 | 628 |
} |
619 | 629 |
|
620 | 630 |
sub set_session_value { |
Auch abrufbar als: Unified diff
Speichern des Session-Inhaltes in eigene Funktion ausgelagert