[open-ils-commits] r15990 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 25 15:41:10 EDT 2010
Author: erickson
Date: 2010-03-25 15:41:05 -0400 (Thu, 25 Mar 2010)
New Revision: 15990
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
Conditionals consolidated
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-03-25 19:41:04 UTC (rev 15989)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-03-25 19:41:05 UTC (rev 15990)
@@ -423,22 +423,19 @@
]);
}
}
-
- if( ! $self->api_name =~ /id_list/ ) {
- for my $hold ( @$holds ) {
- $hold->transit(
- $e->search_action_hold_transit_copy([
- {hold => $hold->id},
- {order_by => {ahtc => 'id desc'}, limit => 1}])->[0]
- );
- }
- }
- if( $self->api_name =~ /id_list/ ) {
- return [ map { $_->id } @$holds ];
- } else {
- return $holds;
- }
+ if( ! $self->api_name =~ /id_list/ ) {
+ for my $hold ( @$holds ) {
+ $hold->transit(
+ $e->search_action_hold_transit_copy([
+ {hold => $hold->id},
+ {order_by => {ahtc => 'id desc'}, limit => 1}])->[0]
+ );
+ }
+ return $holds;
+ }
+ # else id_list
+ return [ map { $_->id } @$holds ];
}
@@ -501,18 +498,15 @@
fulfillment_time => undef,
cancel_time => undef
},
- { order_by => { ahr => "request_time" } });
+ { order_by => { ahr => "request_time" } }
+ );
-
- if( ! $self->api_name =~ /id_list/ ) {
- flesh_hold_transits($holds);
- }
-
- if( $self->api_name =~ /id_list/ ) {
- return [ map { $_->id } @$holds ];
- } else {
- return $holds;
- }
+ if ( ! $self->api_name =~ /id_list/ ) {
+ flesh_hold_transits($holds);
+ return $holds;
+ }
+ # else id_list
+ return [ map { $_->id } @$holds ];
}
More information about the open-ils-commits
mailing list