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: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
97c9e2db9b
commit
16e498a42e
11
C4/Auth.pm
11
C4/Auth.pm
|
|
@ -561,9 +561,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -899,6 +900,7 @@ sub checkauth {
|
|||
$session->delete();
|
||||
$session->flush;
|
||||
C4::Context::_unset_userenv($sessionID);
|
||||
$sessionID = undef;
|
||||
}
|
||||
elsif ($logout) {
|
||||
|
||||
|
|
@ -908,6 +910,7 @@ sub checkauth {
|
|||
$session->delete();
|
||||
$session->flush;
|
||||
C4::Context::_unset_userenv($sessionID);
|
||||
$sessionID = undef;
|
||||
|
||||
if ($cas and $caslogout) {
|
||||
logout_cas($query, $type);
|
||||
|
|
@ -945,7 +948,6 @@ sub checkauth {
|
|||
}
|
||||
|
||||
unless ( $loggedin ) {
|
||||
$sessionID = undef;
|
||||
$userid = undef;
|
||||
}
|
||||
|
||||
|
|
@ -1243,6 +1245,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 New Issue