From f7630f5de412b98d562f8df3a22a1786a2367d56 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 17 Oct 2023 18:13:32 +0000 Subject: [PATCH] Bug 34014: (follow-up) Tidy Signed-off-by: Lucas Gass Signed-off-by: Kelly McElligott Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- C4/Biblio.pm | 4 ++-- cataloguing/addbiblio.pl | 2 +- svc/bib | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 8c562010f0..eea56d7e4c 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -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 ); } diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 7710e3f5c8..a11711afd3 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -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; diff --git a/svc/bib b/svc/bib index fc5996168d..206778058b 100755 --- a/svc/bib +++ b/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' ); } } -- 2.39.5