Bug 29915: Tiny session adjustments
It may be that we need a few additional flushes. And checking the returned session before clearing busc. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
89b9c441fa
commit
5d1daf20ea
2 changed files with 8 additions and 4 deletions
11
C4/Auth.pm
11
C4/Auth.pm
|
@ -565,9 +565,10 @@ sub get_template_and_user {
|
|||
unless ( $pagename =~ /^(?:MARC|ISBD)?detail$/
|
||||
or $pagename =~ /^showmarc$/
|
||||
or $pagename =~ /^addbybiblionumber$/
|
||||
or $pagename =~ /^review$/ ) {
|
||||
my $sessionSearch = get_session( $sessionID || $in->{'query'}->cookie("CGISESSID") );
|
||||
$sessionSearch->clear( ["busc"] ) if ( $sessionSearch->param("busc") );
|
||||
or $pagename =~ /^review$/ )
|
||||
{
|
||||
my $sessionSearch = get_session( $sessionID );
|
||||
$sessionSearch->clear( ["busc"] ) if $sessionSearch;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -903,6 +904,7 @@ sub checkauth {
|
|||
$session->delete();
|
||||
$session->flush;
|
||||
C4::Context::_unset_userenv($sessionID);
|
||||
$sessionID = undef;
|
||||
}
|
||||
elsif ($logout) {
|
||||
|
||||
|
@ -912,6 +914,7 @@ sub checkauth {
|
|||
$session->delete();
|
||||
$session->flush;
|
||||
C4::Context::_unset_userenv($sessionID);
|
||||
$sessionID = undef;
|
||||
|
||||
if ($cas and $caslogout) {
|
||||
logout_cas($query, $type);
|
||||
|
@ -949,7 +952,6 @@ sub checkauth {
|
|||
}
|
||||
|
||||
unless ( $loggedin ) {
|
||||
$sessionID = undef;
|
||||
$userid = undef;
|
||||
}
|
||||
|
||||
|
@ -1247,6 +1249,7 @@ sub checkauth {
|
|||
$session->param( 'sessiontype', 'anon' );
|
||||
$session->param( 'interface', $type);
|
||||
}
|
||||
$session->flush;
|
||||
} # END unless ($userid)
|
||||
|
||||
# finished authentification, now respond
|
||||
|
|
|
@ -218,6 +218,7 @@ sub set_to_session {
|
|||
return () unless $session;
|
||||
$session->param( 'search_history',
|
||||
uri_escape( encode_json($search_history) ) );
|
||||
$session->flush;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue