From 728f3816e3ea235a552c459cf9bb4ff253277d71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 29 Jul 2021 15:34:25 +0200 Subject: [PATCH] Bug 17600: Fix missing C4::AuthoritiesMARC import Signed-off-by: Jonathan Druart --- C4/ILSDI/Services.pm | 1 + cataloguing/value_builder/unimarc_field_210c.pl | 1 + misc/cronjobs/merge_authorities.pl | 2 +- misc/migration_tools/bulkmarcimport.pl | 2 +- misc/migration_tools/rebuild_zebra.pl | 2 +- tools/batch_delete_records.pl | 1 + tools/showdiffmarc.pl | 1 + 7 files changed, 7 insertions(+), 3 deletions(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 54ef783711..c7c5bf994c 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -32,6 +32,7 @@ use CGI qw ( -utf8 ); use DateTime; use C4::Auth; use Koha::DateUtils qw( dt_from_string ); +use C4::AuthoritiesMarc qw( GetAuthorityXML ); use Koha::Biblios; use Koha::Checkouts; diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl index 4ffc85f603..e09e259c2e 100755 --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ b/cataloguing/value_builder/unimarc_field_210c.pl @@ -26,6 +26,7 @@ use C4::Output qw( pagination_bar output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Search; use C4::Koha qw( getnbpages ); +use C4::AuthoritiesMarc qw( GetAuthority SearchAuthorities ); ###TODO To rewrite in order to use SearchAuthorities diff --git a/misc/cronjobs/merge_authorities.pl b/misc/cronjobs/merge_authorities.pl index 1645cfdda4..51cd4ef2b2 100755 --- a/misc/cronjobs/merge_authorities.pl +++ b/misc/cronjobs/merge_authorities.pl @@ -6,7 +6,7 @@ use Pod::Usage qw( pod2usage ); use Time::HiRes qw( gettimeofday ); use Koha::Script -cron; -use C4::AuthoritiesMarc; +use C4::AuthoritiesMarc qw( GetAuthority merge ); use Koha::Authority::MergeRequests; use constant RESET_HOURS => 24; diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index b5ed5f0bed..28dbcac242 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -31,6 +31,7 @@ use C4::MarcModificationTemplates qw( GetModificationTemplates ModifyRecordWithTemplate ); +use C4::C4::AuthoritiesMarc qw( GuessAuthTypeCode GuessAuthId GetAuthority ModAuthority AddAuthority ); use YAML::XS; use Time::HiRes qw( gettimeofday ); @@ -389,7 +390,6 @@ RECORD: while ( ) { } unless ($test_parameter) { if ($authorities){ - use C4::AuthoritiesMarc; my $authtypecode=GuessAuthTypeCode($record, $heading_fields); my $authid= ($id?$id:GuessAuthId($record)); if ($authid && GetAuthority($authid) && $update ){ diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index d389d75092..718c30533d 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -24,7 +24,7 @@ use Fcntl qw( LOCK_EX LOCK_NB LOCK_UN ); use File::Temp qw( tempdir ); use File::Path qw( mkpath rmtree ); use C4::Biblio qw( GetXmlBiblio ); -use C4::AuthoritiesMarc qw( GetAuthority ); +use C4::AuthoritiesMarc qw( GetAuthority GetAuthorityXML ); use C4::Items qw( GetItemsInfo Item2Marc ); use Koha::RecordProcessor; use Koha::Caches; diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index 2ec14ef653..00c8fd107a 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -27,6 +27,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Biblio qw( GetMarcBiblio ); +use C4::AuthoritiesMarc; use Koha::Virtualshelves; use Koha::Authorities; diff --git a/tools/showdiffmarc.pl b/tools/showdiffmarc.pl index c879433578..6864d7219d 100755 --- a/tools/showdiffmarc.pl +++ b/tools/showdiffmarc.pl @@ -31,6 +31,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Biblio qw( GetMarcBiblio ); use C4::Auth qw( get_template_and_user ); use C4::ImportBatch qw( GetRecordFromImportBiblio GetImportBiblios ); +use C4::AuthoritiesMarc qw( GetAuthority ); use Koha::Biblios; -- 2.39.5