X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=catalogue%2Fsearch-history.pl;h=42bef7cfd4695f381a146361950df56516e13122;hb=9d6d641d1f8b77271800f43bc027b651f9aea52b;hp=20e3b8211047464722a84ae4ea3341d1d8c57db1;hpb=a6a954efa83a4d87eee8a8b1a0864b60f01eaa7f;p=srvgit diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl index 20e3b82110..42bef7cfd4 100755 --- a/catalogue/search-history.pl +++ b/catalogue/search-history.pl @@ -19,19 +19,18 @@ # use Modern::Perl; -use CGI; +use CGI qw ( -utf8 ); -use C4::Auth; +use C4::Auth qw( get_template_and_user ); use C4::Search::History; -use C4::Output; +use C4::Output qw( output_html_with_http_headers ); -my $cgi = new CGI; +my $cgi = CGI->new; my ($template, $loggedinuser, $cookie) = get_template_and_user({ template_name => 'catalogue/search-history.tt', query => $cgi, type => "intranet", - authnotrequired => 0, flagsrequired => {catalogue => 1}, }); @@ -47,14 +46,11 @@ if ( $action eq 'delete' ) { C4::Search::History::delete( { userid => $loggedinuser, - sessionid => $sessionid, - type => $type, - previous => $previous + id => [ $cgi->param('id') ], } ); # Redirecting to this same url so the user won't see the search history link in the header - my $uri = $cgi->url(); - print $cgi->redirect($uri); + print $cgi->redirect('/cgi-bin/koha/catalogue/search-history.pl'); # Showing search history } else {