@@ -, +, @@ --- opac/unapi | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) --- a/opac/unapi +++ a/opac/unapi @@ -130,23 +130,23 @@ if (not defined $format) { my $content; - my $marcxml = GetXmlBiblio($biblionumber); - unless (defined $marcxml) { - # no bib, so 404 - print $cgi->header( -status => '404 record not found'); - exit 0; - } - - my $xslt_file = get_xslt_file( $format, $format_to_stylesheet_map, $format_info ); - unless( defined $xslt_file ) { - print $cgi->header( -status => '406 invalid format requested' ); - exit 0; - } - my $xslt_engine = Koha::XSLT_Handler->new; - $content = $xslt_engine->transform({ - xml => $marcxml, - file => $xslt_file, - }); + my $marcxml = GetXmlBiblio($biblionumber); + unless (defined $marcxml) { + # no bib, so 404 + print $cgi->header( -status => '404 record not found'); + exit 0; + } + + my $xslt_file = get_xslt_file( $format, $format_to_stylesheet_map, $format_info ); + unless( defined $xslt_file ) { + print $cgi->header( -status => '406 invalid format requested' ); + exit 0; + } + my $xslt_engine = Koha::XSLT_Handler->new; + $content = $xslt_engine->transform({ + xml => $marcxml, + file => $xslt_file, + }); if( !defined $content || $xslt_engine->err ) { print $cgi->header( -status => '500 internal error' ); --