[open-ils-commits] r19894 - trunk/Open-ILS/src/perlmods/lib/OpenILS/SIP (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 29 12:51:57 EDT 2011
Author: miker
Date: 2011-03-29 12:51:54 -0400 (Tue, 29 Mar 2011)
New Revision: 19894
Modified:
trunk/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
Log:
Inspired by a 1.6 patch from Brandon Uhlman to collect the set of holds not ready for pickup, 2.0+ style
Modified: trunk/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm 2011-03-29 16:22:45 UTC (rev 19893)
+++ trunk/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm 2011-03-29 16:51:54 UTC (rev 19894)
@@ -587,11 +587,23 @@
}
sub unavail_holds {
- my ($self, $start, $end) = @_;
- my @holds;
- syslog('LOG_DEBUG', 'OILS: Patron->unavail_holds()');
- return (defined $start and defined $end) ?
- [ $holds[($start-1)..($end-1)] ] : \@holds;
+ my ($self, $start, $end) = @_;
+ syslog('LOG_DEBUG', 'OILS: Patron->unavail_holds()');
+
+ my @holds_sip_output = map {
+ OpenILS::SIP::clean_text($self->__hold_to_title($_))
+ } @{
+ $self->{editor}->search_action_hold_request({
+ usr => $self->{user}->id,
+ fulfillment_time => undef,
+ cancel_time => undef,
+ shelf_time => undef
+ })
+ };
+
+ return (defined $start and defined $end) ?
+ [ @holds_sip_output[($start-1)..($end-1)] ] :
+ \@holds_sip_output;
}
sub block {
More information about the open-ils-commits
mailing list