diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl index 4a8251f54a..f6714e11c6 100755 --- a/catalogue/search-history.pl +++ b/catalogue/search-history.pl @@ -46,7 +46,8 @@ if ( $action eq 'delete' ) { : q{}; C4::Search::History::delete( { - id => [ $cgi->param('id') ], + userid => $loggedinuser, + id => [ $cgi->param('id') ], } ); # Redirecting to this same url so the user won't see the search history link in the header diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl index 4858b5ac8d..34b0e84c63 100755 --- a/opac/opac-search-history.pl +++ b/opac/opac-search-history.pl @@ -103,7 +103,8 @@ unless ( $loggedinuser ) { if ( @id ) { C4::Search::History::delete( { - id => [ $cgi->param('id') ], + userid => $loggedinuser, + id => [ $cgi->param('id') ], } ); } else {