--- showmarc.pl.master 2018-01-23 15:31:36.741812289 +0100 +++ showmarc.pl.fixed 2018-01-24 08:05:31.872892073 +0100 @@ -37,6 +37,17 @@ use C4::XSLT (); my $input= new CGI; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "catalogue/showmarc.tt", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + debug => 1, + } +); + my $biblionumber= $input->param('id'); my $importid= $input->param('importid'); my $view= $input->param('viewas')||''; @@ -70,16 +81,6 @@ Encode::encode_utf8(C4::XSLT::engine->transform($xml, $xsl)); } else { - my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "catalogue/showmarc.tt", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => { catalogue => 1 }, - debug => 1, - } - ); $template->param( MARC_FORMATTED => $record->as_formatted ); output_html_with_http_headers $input, $cookie, $template->output; }