Bug 9823: Refactor return from GetReservesFromBiblionumber
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 18 Mar 2013 14:37:18 +0000 (14:37 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 30 Jan 2014 16:19:55 +0000 (16:19 +0000)
commit8b685c1e80db99f24d3ee965b8f8d2badb243153
tree9b002181e9816745a39f4343c8642081f1b437a9
parent6e21422d00f02c88384ce361dab86ccc44e92e49
Bug 9823: Refactor return from GetReservesFromBiblionumber

The return from GetReservesFromBiblionumber contains an unnecessary
extra variable. In scalar context an array returns its element count.
Maintaining a separate count can lead to unforeseen bugs
and imposes ugly constructions on the subroutine's users.

Remove the useless count variable from the return

This patch also changes the parameters: now the routine takes a hashref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Placed biblio holds, future holds and item holds. Works as expected.
Tested Holds.t and Reserves.t. Pass.
Tested /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=999 with two holds on
one item. Fine.
C4/SIP/ILS/Item.pm: Looked for "whatever" and "arrayref" and could not find
them anymore. Looks good.
Handled a few unneeded calls in QA follow-up.
Left only one point to-do for serials/routing-preview.pl. See Bugzilla.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
16 files changed:
C4/Biblio.pm
C4/ILSDI/Services.pm
C4/Reserves.pm
C4/SIP/ILS/Item.pm
acqui/parcel.pl
catalogue/ISBDdetail.pl
catalogue/MARCdetail.pl
catalogue/detail.pl
catalogue/imageviewer.pl
catalogue/labeledMARCdetail.pl
catalogue/moredetail.pl
opac/opac-detail.pl
opac/opac-reserve.pl
reserve/request.pl
serials/routing-preview.pl
t/db_dependent/Holds.t