[open-ils-commits] r19901 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/SIP (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 29 13:57:29 EDT 2011
Author: miker
Date: 2011-03-29 13:57:25 -0400 (Tue, 29 Mar 2011)
New Revision: 19901
Modified:
branches/rel_2_0/Open-ILS/src/perlmods/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: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2011-03-29 17:54:18 UTC (rev 19900)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2011-03-29 17:57:25 UTC (rev 19901)
@@ -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