[open-ils-commits] r15974 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 25 09:33:03 EDT 2010


Author: erickson
Date: 2010-03-25 09:33:01 -0400 (Thu, 25 Mar 2010)
New Revision: 15974

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
removed unused vars for clarity, make use of the depth var instead of referencing the original call params (apologies for the extra commits)

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-03-25 13:31:27 UTC (rev 15973)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-03-25 13:33:01 UTC (rev 15974)
@@ -1411,13 +1411,8 @@
 	my( $self, $client, $authtoken, $params ) = @_;
 
     my %params       = %$params;
-    my $titleid      = $params{titleid}      || "";
-    my $volid        = $params{volume_id};
-    my $copyid       = $params{copy_id};
-    my $mrid         = $params{mrid}         || "";
     my $depth        = $params{depth}        || 0;
     my $pickup_lib   = $params{pickup_lib};
-    my $hold_type    = $params{hold_type}    || 'T';
     my $selection_ou = $params{selection_ou} || $pickup_lib;
 
 	my $e = new_editor(authtoken=>$authtoken);
@@ -1438,13 +1433,13 @@
     my $soft_boundary = $U->ou_ancestor_setting_value($selection_ou, OILS_SETTING_HOLD_SOFT_BOUNDARY);
     my $hard_boundary = $U->ou_ancestor_setting_value($selection_ou, OILS_SETTING_HOLD_HARD_BOUNDARY);
 
-    if(defined $soft_boundary and $$params{depth} < $soft_boundary) {
+    if(defined $soft_boundary and $depth < $soft_boundary) {
         # work up the tree and as soon as we find a potential copy, use that depth
         # also, make sure we don't go past the hard boundary if it exists
 
         # our min boundary is the greater of user-specified boundary or hard boundary
-        my $min_depth = (defined $hard_boundary and $hard_boundary > $$params{depth}) ?  
-            $hard_boundary : $$params{depth};
+        my $min_depth = (defined $hard_boundary and $hard_boundary > $depth) ?  
+            $hard_boundary : $depth;
 
         my $depth = $soft_boundary;
         while($depth >= $min_depth) {
@@ -1453,7 +1448,7 @@
             return {success => 1, depth => $depth, local_avail => $status[1]} if $status[0];
             $depth--;
         }
-    } elsif(defined $hard_boundary and $$params{depth} < $hard_boundary) {
+    } elsif(defined $hard_boundary and $depth < $hard_boundary) {
         # there is no soft boundary, enforce the hard boundary if it exists
         $logger->info("performing hold possibility check with hard boundary $hard_boundary");
         my @status = do_possibility_checks($e, $patron, $request_lib, $hard_boundary, %params);



More information about the open-ils-commits mailing list