@@ -, +, @@ --- C4/Auth.pm | 11 +++++++---- C4/Search/History.pm | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) --- a/C4/Auth.pm +++ a/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; } } @@ -904,6 +905,7 @@ sub checkauth { $session->delete(); $session->flush; C4::Context::_unset_userenv($sessionID); + $sessionID = undef; } elsif ($logout) { @@ -914,6 +916,7 @@ sub checkauth { $session->flush; $cookies = clear_all_cookies($query); C4::Context::_unset_userenv($sessionID); + $sessionID = undef; if ($cas and $caslogout) { logout_cas($query, $type); @@ -951,7 +954,6 @@ sub checkauth { } unless ( $loggedin ) { - $sessionID = undef; $userid = undef; } @@ -1249,6 +1251,7 @@ sub checkauth { $session->param( 'sessiontype', 'anon' ); $session->param( 'interface', $type); } + $session->flush; } # END unless ($userid) # finished authentification, now respond --- a/C4/Search/History.pm +++ a/C4/Search/History.pm @@ -218,6 +218,7 @@ sub set_to_session { return () unless $session; $session->param( 'search_history', uri_escape( encode_json($search_history) ) ); + $session->flush; } 1; --