Bug 4943: Search history cookie size limit
[koha.git] / opac / opac-search.pl
index c145729..a38d6f9 100755 (executable)
@@ -504,6 +504,7 @@ for (my $i=0;$i<@servers;$i++) {
                    $template->param(ShowOpacRecentSearchLink => 1);
                }
  
+            shift @recentSearches if (@recentSearches > 15);
                # Pushing the cookie back 
                $newsearchcookie = $cgi->cookie(
                                            -name => 'KohaOpacRecentSearches',