From 914515202df0612c1cdb64bf408120a1364316a0 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 10 Jan 2014 16:49:01 +0000 Subject: [PATCH] Bug 10952: (follow-up) clear seach history from session after saving it to DB This patch makes sure that the search history from an anonymous session is cleared from the session after a user logs in (and the session history is saved to that user's record in the database). This fixes a problem where the search history from the session got repeatedly added to the database each time the user did something while logged into the OPAC. Signed-off-by: Galen Charlton --- C4/Auth.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index 736cb64ae5..44edf67ce2 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -273,6 +273,9 @@ sub get_template_and_user { $_->{'time'}, ) foreach @recentSearches; + # clear out the search history from the session now that + # we've saved it to the database + SetSearchHistorySession($in->{'query'}, []); } } } -- 2.39.5