From 5fd30dc5f2d20b57eb944887e571b179466da41c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Oct 2015 15:38:54 +0000 Subject: [PATCH] Bug 15005: Remove CGI->url calls from pl scripts Same as previous patch for calls in pl scripts. Test plan: - delete an entry of your search history from intranet and opac - with IndependentBranches=OFF, go on the waiting holds and confirm that the link next to 'Holds awaiting pickup for your library on' is correct. - search for items, the pagination should work correctly Signed-off-by: Josef Moravec Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- catalogue/itemsearch.pl | 2 +- catalogue/search-history.pl | 3 +-- circ/waitingreserves.pl | 2 +- opac/opac-search-history.pl | 6 ++---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index ed1a932207..82a4161275 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -222,7 +222,7 @@ if (scalar keys %params > 0) { if ($format eq 'html') { # Build pagination bar - my $url = $cgi->url(-absolute => 1); + my $url = '/cgi-bin/koha/catalogue/itemsearch.pl'; my @params; foreach my $p (keys %params) { my @v = $cgi->param($p); diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl index e60f20ba34..4a8251f54a 100755 --- a/catalogue/search-history.pl +++ b/catalogue/search-history.pl @@ -50,8 +50,7 @@ if ( $action eq 'delete' ) { } ); # 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 { diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 577a926ea2..3e1b5c2734 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -75,7 +75,7 @@ if ($item) { if ( C4::Context->preference('IndependentBranches') ) { undef $all_branches; } else { - $template->param( all_branches_link => $input->url . '?allbranches=1' ) + $template->param( all_branches_link => '/cgi-bin/koha/circ/waitingreserves.pl' . '?allbranches=1' ) unless $all_branches; } $template->param( all_branches => 1 ) if $all_branches; diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl index 7df51d90ec..486bd08fae 100755 --- a/opac/opac-search-history.pl +++ b/opac/opac-search-history.pl @@ -72,8 +72,7 @@ unless ( $loggedinuser ) { C4::Search::History::set_to_session({ cgi => $cgi, search_history => \@searches }); # 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 => $uri); + print $cgi->redirect(-uri => '/cgi-bin/koha/opac-search-history.pl'); # Showing search history } else { # Getting the searches from session @@ -115,8 +114,7 @@ unless ( $loggedinuser ) { ); } # 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(-uri => '/cgi-bin/koha/opac-search-history.pl'); # Showing search history } else { -- 2.39.5