# Koha modules used
use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
-use C4::AuthoritiesMarc;
-use C4::ImportBatch;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Auth qw( get_template_and_user );
+use C4::ImportBatch qw( GetImportBiblios );
+use C4::AuthoritiesMarc qw( GetAuthority );
use Koha::Biblios;
+use Koha::Import::Records;
# Input params
-my $input = new CGI;
+my $input = CGI->new;
my $recordid = $input->param('id');
my $importid = $input->param('importid');
my $batchid = $input->param('batchid');
template_name => "tools/showdiffmarc.tt",
query => $input,
type => "intranet",
- authnotrequired => 0,
flagsrequired => { tools => 'manage_staged_marc' },
- debug => 1,
}
);
if ( $type eq 'biblio' ) {
- $record = GetMarcBiblio({
- biblionumber => $recordid,
- embed_items => 1,
- });
my $biblio = Koha::Biblios->find( $recordid );
+ $record = $biblio->metadata->record({ embed_items => 1 });
$recordTitle = $biblio->title;
}
elsif ( $type eq 'auth' ) {
}
if( $importid ) {
- $recordImportid = C4::ImportBatch::GetRecordFromImportBiblio( $importid, 'embed_items' );
+ my $import_record = Koha::Import::Records->find($importid);
+ my $recordImportid = $import_record->get_marc_record();
$formatted2 = $recordImportid->as_formatted;
my $biblio = GetImportBiblios($importid);
$importTitle = $biblio->[0]->{'title'};