[open-ils-commits] r15387 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 26 11:35:40 EST 2010
Author: phasefx
Date: 2010-01-26 11:35:37 -0500 (Tue, 26 Jan 2010)
New Revision: 15387
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
Dedup recs from open-ils.search.biblio.isbn_list. Consistent whitespace with the rest of Biblio.pm
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-26 16:29:31 UTC (rev 15386)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-26 16:35:37 UTC (rev 15387)
@@ -1538,11 +1538,17 @@
sub biblio_search_isbn_batch {
my( $self, $client, $isbn_list ) = @_;
$logger->debug("Searching ISBNs @$isbn_list");
- my $e = new_editor();
- my @recs = ();
- @recs = ( @recs, @{ $U->storagereq(
- 'open-ils.storage.id_list.biblio.record_entry.search.isbn.atomic', $_ )
- } ) for @$isbn_list;
+ my @recs = (); my %rec_set = ();
+ foreach my $isbn ( @$isbn_list ) {
+ foreach my $rec ( @{ $U->storagereq(
+ 'open-ils.storage.id_list.biblio.record_entry.search.isbn.atomic', $isbn )
+ } ) {
+ if (! $rec_set{ $rec }) {
+ $rec_set{ $rec } = 1;
+ push @recs, $rec;
+ }
+ }
+ }
return { ids => \@recs, count => scalar(@recs) };
}
More information about the open-ils-commits
mailing list