Bug 9823: Refactor return from GetReservesFromBiblionumber
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 18 Mar 2013 14:37:18 +0000 (14:37 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 27 May 2014 10:17:44 +0000 (12:17 +0200)
commit82d6e097f5469708841bc150920681a203de58f8
treebbaa9c98c9c7e9880834606914aff7c1b4f4519b
parent90cce3c059f63be213aa665377d1b6221c4c4ca1
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>
(cherry picked from commit 8b685c1e80db99f24d3ee965b8f8d2badb243153)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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