added staff call to modsize stuff
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 27 Jul 2005 20:59:35 +0000 (20:59 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 27 Jul 2005 20:59:35 +0000 (20:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1554 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index e01d9a9..e0b4920 100644 (file)
@@ -747,6 +747,10 @@ __PACKAGE__->register_method(
        method  => "biblio_mrid_to_modsbatch",
        api_name        => "open-ils.search.biblio.metarecord.mods_slim.retrieve");
 
+__PACKAGE__->register_method(
+       method  => "biblio_mrid_to_modsbatch",
+       api_name        => "open-ils.search.biblio.metarecord.mods_slim.retrieve.staff");
+
 sub biblio_mrid_to_modsbatch {
        my( $self, $client, $mrid ) = @_;
 
@@ -775,7 +779,12 @@ sub biblio_mrid_to_modsbatch {
 
 
        warn "Creating mods batch for metarecord $mrid\n";
-       my $id_hash = biblio_mrid_to_record_ids( undef, undef,  $mrid );
+       my $meth = "open-ils.search.biblio.metarecord_to_records";
+       if( $self->api_name =~ /staff/ ) { $meth .= ".staff";}
+       $meth = $self->method_lookup($meth);
+
+       my ($id_hash) = $meth->run($mrid);
+
        my @ids = @{$id_hash->{ids}};
 
        if(@ids < 1) { return undef; }
@@ -783,6 +792,8 @@ sub biblio_mrid_to_modsbatch {
        warn "Master ID is $master_id\n";
        # grab the master record to start the mods batch 
 
+       $meth = "open-ils.storage.direct.biblio.record_entry.retrieve";
+
        my $record = OpenILS::Application::AppUtils->simple_scalar_request( "open-ils.storage", 
                        "open-ils.storage.direct.biblio.record_entry.retrieve", $master_id );