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 <gmc@esilibrary.com>
(cherry picked from commit 914515202d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Galen Charlton 2014-01-10 16:49:01 +00:00 committed by Fridolin Somers
parent a3157af700
commit 9c779efdcd
1 changed files with 3 additions and 0 deletions

View File

@ -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'}, []);
}
}
}