From e485f7149a84757c2adf6c3d75834aca935c249b Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Sun, 28 Aug 2022 00:24:25 +0300 Subject: [PATCH] Bug 20447: (QA follow-up) include Koha::Holdings where needed (and remove uses where don't) --- C4/XSLT.pm | 1 + Koha/Exporter/Record.pm | 2 ++ Koha/UI/Form/Builder/Item.pm | 1 + cataloguing/addholding.pl | 1 + cataloguing/additem.pl | 1 - misc/migration_tools/bulkmarcimport.pl | 1 - t/db_dependent/Exporter/Record.t | 1 - t/db_dependent/Koha/Item.t | 1 - 8 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 56f4b94f23..60c1143adf 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -31,6 +31,7 @@ use Koha::ItemTypes; use Koha::XSLT::Base; use Koha::Libraries; use Koha::Recalls; +use Koha::Holdings; my $engine; #XSLT Handler object my %authval_per_framework; diff --git a/Koha/Exporter/Record.pm b/Koha/Exporter/Record.pm index beff0d89e8..68d0f590eb 100644 --- a/Koha/Exporter/Record.pm +++ b/Koha/Exporter/Record.pm @@ -11,6 +11,8 @@ use Koha::CsvProfiles; use Koha::Logger; use List::Util qw( all any ); +use Koha::Holdings; + sub _get_record_for_export { my ($params) = @_; my $record_type = $params->{record_type}; diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm index 3458e8ee10..c003879d35 100644 --- a/Koha/UI/Form/Builder/Item.pm +++ b/Koha/UI/Form/Builder/Item.pm @@ -24,6 +24,7 @@ use C4::ClassSource qw( GetClassSources ); use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; +use Koha::Holdings; =head1 NAME diff --git a/cataloguing/addholding.pl b/cataloguing/addholding.pl index 71bd3503d1..5a8f21a02c 100755 --- a/cataloguing/addholding.pl +++ b/cataloguing/addholding.pl @@ -36,6 +36,7 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::ItemTypes; use Koha::Libraries; +use Koha::Holdings; use Date::Calc qw(Today); use MARC::File::USMARC; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index f684c35195..e8a64c1015 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -37,7 +37,6 @@ use C4::Circulation qw( barcodedecode LostItem ); use C4::Barcodes; use C4::Barcodes::ValueBuilder; use Koha::DateUtils qw( dt_from_string ); -use Koha::Holdings; use Koha::Items; use Koha::ItemTypes; use Koha::Libraries; diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 1fb4b43ba2..4f0583e154 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -36,7 +36,6 @@ use FindBin (); use Koha::Logger; use Koha::Biblios; -use Koha::Holdings; use Koha::SearchEngine; use Koha::SearchEngine::Search; diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index a4c00fa0de..cb0cf232fb 100755 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -38,7 +38,6 @@ use Koha::Biblio::Metadata; use Koha::Biblio::Metadatas; use Koha::BiblioFramework; use Koha::BiblioFrameworks; -use Koha::Holdings; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index fc8f4c89af..4d013d867b 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -28,7 +28,6 @@ use C4::Biblio qw( GetMarcSubfieldStructure ); use C4::Circulation qw( AddIssue AddReturn ); use Koha::Caches; -use Koha::Holdings; use Koha::Items; use Koha::Database; use Koha::DateUtils qw( dt_from_string ); -- 2.37.2