Bugzilla – Attachment 182724 Details for
Bug 39967
When LoadSearchHistoryToTheFirstLoggedUser is enabled, search history is added at every page load
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39967: Reload session after modification
Bug-39967-Reload-session-after-modification.patch (text/plain), 1.44 KB, created by
Julian Maurice
on 2025-05-22 10:02:14 UTC
(
hide
)
Description:
Bug 39967: Reload session after modification
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2025-05-22 10:02:14 UTC
Size:
1.44 KB
patch
obsolete
>From 8e2597db5d63e12187af9d9b1ac2592538587a08 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 22 May 2025 09:58:55 +0000 >Subject: [PATCH] Bug 39967: Reload session after modification > >Otherwise the existing $session still holds outdated data that is >written on the next flush, which overwrites what has been set by >C4::Search::History::set_to_session > >Test plan: >1. Enable LoadSearchHistoryToTheFirstLoggedUser and EnableOpacSearchHistory >2. Go to OPAC. If logged in, log out. >3. Go to search history and remove all searches if any. >4. Perform a search, make sure it appears in your search history >5. Log in and go to your search history. See that your unauthenticated > search history has been added to your account's search history >6. Reload the page multiple times. See that the unauthenticated search > history is *NOT* re-added after each page reload >--- > C4/Auth.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 2fa9e2bed7..ff716e1ee2 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -436,6 +436,7 @@ sub get_template_and_user { > } > } > C4::Search::History::set_to_session( { cgi => $in->{'query'}, search_history => [] } ); >+ $session = get_session($sessionID) if $session; > > } elsif ( $in->{type} eq 'intranet' and C4::Context->preference('EnableSearchHistory') ) { > $template->param( EnableSearchHistory => 1 ); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39967
:
182724
|
182738