Bug 34014: (follow-up) Tidy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7630f5de4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b2b5ec6d15
commit
ecfeda3085
|
|
@ -374,11 +374,11 @@ sub ModBiblio {
|
|||
my $record;
|
||||
my $decoding_error = "";
|
||||
eval { $record = $biblio->metadata->record };
|
||||
if( $@ ){
|
||||
if ($@) {
|
||||
my $exception = $@;
|
||||
$exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
|
||||
$decoding_error = "There was an error with this bibliographic record: " . $exception;
|
||||
$record = $biblio->metadata->record_strip_nonxml;
|
||||
$record = $biblio->metadata->record_strip_nonxml;
|
||||
}
|
||||
logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio $decoding_error BEFORE=>" . $record->as_formatted );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ my (
|
|||
|
||||
if ( $biblio && !$breedingid ) {
|
||||
eval { $record = $biblio->metadata->record };
|
||||
if( $@ ){
|
||||
if ($@) {
|
||||
my $exception = $@;
|
||||
$exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
|
||||
$record = $biblio->metadata->record_strip_nonxml;
|
||||
|
|
|
|||
12
svc/bib
12
svc/bib
|
|
@ -70,18 +70,18 @@ sub fetch_bib {
|
|||
my $record;
|
||||
my $exception;
|
||||
my $invalid_metadata;
|
||||
eval { $record = $biblio->metadata->record({ embed_items => scalar $query->param('items') }) };
|
||||
if( $@ ){
|
||||
eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) };
|
||||
if ($@) {
|
||||
$exception = $@;
|
||||
$exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
|
||||
$record = $biblio->metadata->record_strip_nonxml({ embed_items => scalar $query->param('items') });
|
||||
$record = $biblio->metadata->record_strip_nonxml( { embed_items => scalar $query->param('items') } );
|
||||
$invalid_metadata = 1;
|
||||
}
|
||||
if (defined $record) {
|
||||
print $query->header(-type => 'text/xml',-charset => 'utf-8', -invalid_metadata => $invalid_metadata );
|
||||
if ( defined $record ) {
|
||||
print $query->header( -type => 'text/xml', -charset => 'utf-8', -invalid_metadata => $invalid_metadata );
|
||||
print $record->as_xml_record();
|
||||
} else {
|
||||
print $query->header(-type => 'text/xml', -status => '404 Not Found');
|
||||
print $query->header( -type => 'text/xml', -status => '404 Not Found' );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue