}
# Opac search history
- my $newsearchcookie;
if (C4::Context->preference('EnableOpacSearchHistory')) {
my @recentSearches = ParseSearchHistorySession($cgi);
}
shift @recentSearches if (@recentSearches > 15);
- # Pushing the cookie back
SetSearchHistorySession($cgi, \@recentSearches);
}
else {
- # To the session (the user is logged in)
+ # To the database (the user is logged in)
if (!$offset) {
AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc_history, $query_cgi_history, $total);
$template->param(ShowOpacRecentSearchLink => 1);