Bug 17804: Remove some modules from showdiffmarc.pl

Remove DBI, LibXML, LibXSLT.
Add CGI's -utf8 flag.
Few whitespace changes.

Test plan:
[1] Export an existing record to marcxml.
[2] Edit the file, make some small changes.
[3] Import it again, use a matching rule.
[4] Check the diff on Manage staged. (Here is showdiffmarc.pl)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2016-12-21 14:13:23 +01:00 committed by Kyle M Hall
parent f15eb9d5f5
commit d84458374b

View file

@ -22,8 +22,7 @@
use Modern::Perl;
# standard or CPAN modules used
use CGI qw(:standard);
use DBI;
use CGI qw(:standard -utf8);
# Koha modules used
use C4::Context;
@ -31,9 +30,6 @@ use C4::Output;
use C4::Auth;
use C4::Biblio;
use C4::ImportBatch;
use XML::LibXSLT;
use XML::LibXML;
# Input params
my $input = new CGI;
@ -41,16 +37,13 @@ my $biblionumber = $input->param('id');
my $importid = $input->param('importid');
my $batchid = $input->param('batchid');
if ( not $biblionumber or not $importid ) {
print $input->redirect("/cgi-bin/koha/errors/404.pl");
exit;
}
# Init vars
my ($recordBiblionumber, $recordImportid, $biblioTitle, $importTitle, $formatted1, $formatted2,
$errorFormatted1, $errorFormatted2);
my ($recordBiblionumber, $recordImportid, $biblioTitle, $importTitle, $formatted1, $formatted2, $errorFormatted1, $errorFormatted2);
# Prepare template
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@ -64,7 +57,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
$recordBiblionumber = GetMarcBiblio($biblionumber, 'embed_items');
if( $recordBiblionumber ) {
$formatted1 = $recordBiblionumber->as_formatted;
@ -83,7 +75,6 @@ if( $importid ) {
$errorFormatted2 = 1;
}
$template->param(
SCRIPT_NAME => '/cgi-bin/koha/tools/showdiffmarc.pl',
BIBLIONUMBER => $biblionumber,