Bug 15005: Remove CGI->url calls from pl scripts
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Oct 2015 15:38:54 +0000 (15:38 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 19 Oct 2015 12:36:43 +0000 (09:36 -0300)
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 <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

catalogue/itemsearch.pl
catalogue/search-history.pl
circ/waitingreserves.pl
opac/opac-search-history.pl

index ed1a932..82a4161 100755 (executable)
@@ -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);
index e60f20b..4a8251f 100755 (executable)
@@ -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 {
index 577a926..3e1b5c2 100755 (executable)
@@ -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;
index 7df51d9..486bd08 100755 (executable)
@@ -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 {