From 04ce87c4c0f8e73b1213aca8e9c3591967c6e94e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Apr 2020 15:44:55 +0200 Subject: [PATCH] Bug 16547: Remove more multi_holds inconsistencies There was a bug, on the biblio's hold list view, if the pickup library was changed, the next screen was "place a hold for no title" http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers= Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 5 ++--- reserve/modrequest.pl | 12 +++++------- reserve/placerequest.pl | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index acb9bd9139..2f5f0ebdb7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -96,7 +96,7 @@
  • Clubs
  • -
    +
    Enter patron card number or partial name:
    @@ -791,7 +791,6 @@ [% IF ( reserveloop ) %] [% IF ( multi_hold ) %] - [% END %] @@ -1059,7 +1058,7 @@ .then(function(result) { let url = 'request.pl?biblionumber='+biblionumber; if(biblionumbers_text) { - url = 'request.pl?biblionumbers='+biblionumbers_text+'&multi_hold=1'; + url = 'request.pl?biblionumbers='+biblionumbers_text; } document.location = url; }) diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl index a1f9733733..6c134efe3a 100755 --- a/reserve/modrequest.pl +++ b/reserve/modrequest.pl @@ -24,6 +24,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); +use List::MoreUtils qw( uniq ); use C4::Output; use C4::Reserves; use C4::Auth; @@ -43,15 +44,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my @reserve_id = $query->multi_param('reserve_id'); my @rank = $query->multi_param('rank-request'); -my @biblionumber = $query->multi_param('biblionumber'); my @borrower = $query->multi_param('borrowernumber'); my @reservedates = $query->multi_param('reservedate'); my @expirationdates = $query->multi_param('expirationdate'); my @branch = $query->multi_param('pickup'); my @itemnumber = $query->multi_param('itemnumber'); -my $biblionumbers = $query->param('biblionumbers'); +my @biblionumber = $query->multi_param('biblionumber'); my $count=@rank; +@biblionumber = uniq @biblionumber; + my $CancelBiblioNumber = $query->param('CancelBiblioNumber'); my $CancelBorrowerNumber = $query->param('CancelBorrowerNumber'); my $CancelItemnumber = $query->param('CancelItemnumber'); @@ -93,10 +95,6 @@ if ( $from eq 'borrower'){ print $query->redirect("/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrower[0]"); } else { my $url = "/cgi-bin/koha/reserve/request.pl?"; - if (@biblionumber > 1) { - $url .= "multi_hold=1&biblionumbers=$biblionumbers"; - } else { - $url .= "biblionumber=$biblionumber[0]"; - } + $url .= "biblionumbers=" . join('/', @biblionumber); print $query->redirect($url); } diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 88fa59338a..0b4a12c206 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -165,7 +165,7 @@ if ( $type eq 'str8' && $borrower ) { if ($bad_bibs) { $biblionumbers .= $bad_bibs; } - print $input->redirect("request.pl?biblionumber=$biblionumber"); + print $input->redirect("request.pl?biblionumbers=$biblionumbers"); } elsif ( $borrowernumber eq '' ) { print $input->header(); -- 2.39.5