Fix lp1076379: Can't edit holds beyond first page. user/dyrcona/lp1076379
authorJason Stephenson <jstephenson@mvlc.org>
Thu, 8 Nov 2012 20:09:09 +0000 (15:09 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Thu, 8 Nov 2012 20:21:33 +0000 (15:21 -0500)
commit8b2337cb43402cc675236bc32674f55f2331f162
treed627943901a5a4649cd20831e2c51c247c13a2be
parent2e10326b9e0ee22982a2b9ac45b6f75a1ee57103
Fix lp1076379: Can't edit holds beyond first page.

When a hold was being edited on page 2+ of a patron's list of holds, the
offset was > 0. Since the input hold_ids array ref has only 1 member, using
the offset as a starting point in searching began the search beyond the end
of the array and thus returned nothing.

The code in this commit moves the handling of the offset and limit to cases
where the input hold_ids is undefined, as this is, I think the intended
behavior. Typically when hold_ids is passed to the fetch_user_holds function
in EGCatLoader::Account, you want to retrieve those holds regardless of
the offset and limit values.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm