[Koha-bugs] [Bug 9823] Code optimization: Change prototype of GetReservesFromBiblionumber

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 24 11:39:17 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9823

M. de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24653|0                           |1
        is obsolete|                            |

--- Comment #16 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 24668
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24668&action=edit
Bug 9823: Refactor return from GetReservesFromBiblionumber

The return from GetReservesFromBiblionumber contains an unnecessary
extra variable. In scalar context an array returns its element count.
Maintaing 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 at 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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list