Lines 98-111
sub new {
Link Here
|
98 |
push @setSpecs, $_->{spec}; |
98 |
push @setSpecs, $_->{spec}; |
99 |
} |
99 |
} |
100 |
|
100 |
|
101 |
if ($deleted) { |
101 |
#NOTE: Show a deleted record if there is no metadata |
|
|
102 |
# We fetch it using this method, rather than the database directly, |
103 |
# so it'll include the item data |
104 |
my ( $marcxml, $marcxml_error ) = |
105 |
$deleted ? undef : $repository->get_biblio_marcxml( $biblionumber, $args{metadataPrefix} ); |
106 |
if ( ! $marcxml ) { |
102 |
$self->record( |
107 |
$self->record( |
103 |
Koha::OAI::Server::DeletedRecord->new($timestamp, \@setSpecs, %args) |
108 |
Koha::OAI::Server::DeletedRecord->new($timestamp, \@setSpecs, %args) |
104 |
); |
109 |
); |
105 |
} else { |
110 |
} else { |
106 |
# We fetch it using this method, rather than the database directly, |
|
|
107 |
# so it'll include the item data |
108 |
my ( $marcxml, $marcxml_error ) = $repository->get_biblio_marcxml( $biblionumber, $args{metadataPrefix} ); |
109 |
$args{about} = [$marcxml_error] if $marcxml_error; |
111 |
$args{about} = [$marcxml_error] if $marcxml_error; |
110 |
$self->record( |
112 |
$self->record( |
111 |
Koha::OAI::Server::Record->new($repository, $marcxml, $timestamp, \@setSpecs, %args) |
113 |
Koha::OAI::Server::Record->new($repository, $marcxml, $timestamp, \@setSpecs, %args) |