Bug 21125: Shortcut moredetail.pl on nonexistent biblionumber
[koha.git] / catalogue / search-history.pl
index 20e3b82..f6714e1 100755 (executable)
@@ -19,7 +19,7 @@
 # <http://www.gnu.org/licenses>
 
 use Modern::Perl;
-use CGI;
+use CGI qw ( -utf8 );
 
 use C4::Auth;
 use C4::Search::History;
@@ -47,14 +47,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 {