+ if ($multi_hold) {
+ my $bibinfo = $bibinfos{$biblionumber};
+ AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',[$biblionumber],
+ $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
+ } else {
+ if ($input->param('request') eq 'any'){
+ # place a request on 1st available
+ AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem,$found);
+ } elsif ($reqbib[0] ne ''){
+ # FIXME : elsif probably never reached, (see top of the script)
+ # place a request on a given item
+ AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found);
+ } else {
+ AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found);
+ }
+ }
+ }
+
+ if ($multi_hold) {
+ if ($bad_bibs) {
+ $biblionumbers .= $bad_bibs;
+ }
+ print $input->redirect("request.pl?biblionumbers=$biblionumbers&multi_hold=1");
+ } else {
+ print $input->redirect("request.pl?biblionumber=$biblionumber");
+ }
+} elsif ($borrower eq ''){
+ print $input->header();
+ print "Invalid borrower number please try again";
+# Not sure that Dump() does HTML escaping. Use firebug or something to trace
+# instead.
+# print $input->Dump;