From 31960e86dfb58dc2b2acc09af3c6f78573cd380b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 15 Feb 2022 01:51:04 +1300 Subject: [PATCH] Bug 13952: (follow-up) JS translatability, clean warns, other Also addresses QA test tools, perldoc in ImportExportFramework.pm Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- C4/ImportExportFramework.pm | 5 ++++- admin/import_export_authtype.pl | 2 +- koha-tmpl/intranet-tmpl/prog/js/authtype.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm index a05c003019..3d44d46ec3 100644 --- a/C4/ImportExportFramework.pm +++ b/C4/ImportExportFramework.pm @@ -193,7 +193,7 @@ Functions for handling import/export. =head2 ExportFramework -Export all the information of a MARC or Authority Type Framework to an excel "xml" file, comma separated values "csv" file or OpenDocument SpreadSheet "ods" file. +Export all information of a bibliographic or authority MARC framework to an Excel "xml" file, comma separated values "csv" or OpenDocument SpreadSheet "ods". return : succes @@ -647,6 +647,7 @@ sub ImportFramework my $tempdir; my $ok = -1; my $dbh = C4::Context->dbh; + $frameworktype ||= ''; if (-r $filename && $dbh) { my $extension = ''; if ($filename =~ /\.(csv|ods|xml)$/i) { @@ -821,6 +822,7 @@ sub _import_table my %fields2Delete; my $query; my @fields; + $frameworktype ||= ''; # Create hash with all elements defined by primary key to know which ones to delete after parsing the spreadsheet eval { @fields = @$PKArray; @@ -1115,6 +1117,7 @@ sub _getDataFields my $dataFields = {}; my @dataFieldsA = (); + $frameworktype ||= ''; if ($node && $node->hasChildNodes()) { my $node2 = $node->firstChild; my ($data, $repeated); diff --git a/admin/import_export_authtype.pl b/admin/import_export_authtype.pl index 11cab491f0..e12bcc7887 100755 --- a/admin/import_export_authtype.pl +++ b/admin/import_export_authtype.pl @@ -33,7 +33,7 @@ if (exists $cookies{'CGISESSID'}) { ); } -my $input = new CGI; +my $input = CGI->new; unless ($auth_status eq 'ok') { print $input->header(-type => 'text/plain', -status => '403 Forbidden'); diff --git a/koha-tmpl/intranet-tmpl/prog/js/authtype.js b/koha-tmpl/intranet-tmpl/prog/js/authtype.js index 0a7341a39a..f1ce1c87f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/authtype.js +++ b/koha-tmpl/intranet-tmpl/prog/js/authtype.js @@ -34,7 +34,7 @@ $(document).ready(function() { var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search); if (matches && matches.length > 1) { - alert(_("Error importing the authority type %s").format(decodeURIComponent(matches[1]))); + alert(__("Error importing the authority type %s").format(decodeURIComponent(matches[1]))); } $('input.input_import').change( function() { -- 2.39.5