From 67a1284735c74e71d3e0cfaaeef98f3cd3ee9bf1 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 22 Jan 2007 18:15:23 +0000 Subject: [PATCH] changed the list of seen copies to a hash based on copy id git-svn-id: svn://svn.open-ils.org/ILS/trunk@6799 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 481da6eb7f..fee7daa744 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -1173,7 +1173,7 @@ sub _check_title_hold_is_possible { @keys = sort { $a <=> $b } keys %buckets; my $title; - my @seen; + my %seen; for my $key (@keys) { my @cps = @{$buckets{$key}}; @@ -1181,8 +1181,8 @@ sub _check_title_hold_is_possible { for my $copy (@cps) { - next if grep { $_ eq $copy->id } @seen; - push(@seen, $copy->id); # there could be dupes given the merged buckets + next if $seen{$copy->id}; + $seen{$copy->id} = 1; # there could be dupes given the merged buckets $logger->debug("looking at bucket_key=$key, copy ".$copy->id." : circ_lib = " . $copy->circ_lib); unless($title) { # grab the title if we don't already have it -- 2.43.2