open-ils.search.biblio.isbn_list [ isbn1, isbn2, ... ]. This is making multiple...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jan 2010 21:08:05 +0000 (21:08 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jan 2010 21:08:05 +0000 (21:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15384 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm

index ab4e2db..3c59a4e 100644 (file)
@@ -1530,6 +1530,21 @@ sub biblio_search_isbn {
        return { ids => $recs, count => scalar(@$recs) };
 }
 
+__PACKAGE__->register_method(
+       method  => "biblio_search_isbn_batch",
+       api_name        => "open-ils.search.biblio.isbn_list",
+);
+
+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;
+       return { ids => \@recs, count => scalar(@recs) };
+}
 
 __PACKAGE__->register_method(
        method  => "biblio_search_issn",