Bug 15344: Remove some other calls of GetMemberDetails from pl scripts
[koha.git] / circ / waitingreserves.pl
index a8d3fe4..67afdcc 100755 (executable)
@@ -46,6 +46,7 @@ my $fbr            = $input->param('fbr') || '';
 my $tbr            = $input->param('tbr') || '';
 my $all_branches   = $input->param('allbranches') || '';
 my $cancelall      = $input->param('cancelall');
+my $tab            = $input->param('tab');
 
 my $cancel;
 
@@ -75,7 +76,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;
@@ -157,11 +158,13 @@ $template->param(
     reservecount => $reservcount,
     overloop    => \@overloop,
     overcount   => $overcount,
-    show_date   => output_pref({ dt => dt_from_string, dateonly => 1 }),
+    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
     ReservesMaxPickUpDelay => C4::Context->preference('ReservesMaxPickUpDelay')
 );
 
-if ($cancelall) {
+if ($item && $tab eq 'holdsover') {
+    print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover");
+} elsif ($cancelall) {
     print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl");
 } else {
     output_html_with_http_headers $input, $cookie, $template->output;
@@ -185,7 +188,7 @@ sub cancel {
     # if we have a result
     if ($nextreservinfo) {
         my %res;
-        my $borrowerinfo = GetMemberDetails( $nextreservinfo );
+        my $borrowerinfo = C4::Members::GetMember( borrowernumber => $nextreservinfo );
         my $iteminfo = GetBiblioFromItemNumber($item);
         if ( $messages->{'transfert'} ) {
             $res{messagetransfert} = $messages->{'transfert'};