From 8961549b3769c5e8c9414e728e49e2c13c5ab50a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 21 May 2021 17:33:15 +0200 Subject: [PATCH] Bug 17600: Manual changes --- C4/Auth.pm | 2 +- C4/Biblio.pm | 4 +++- C4/Breeding.pm | 2 +- C4/Circulation.pm | 3 ++- C4/HoldsQueue.pm | 1 - C4/ILSDI/Services.pm | 2 +- C4/ImportBatch.pm | 2 +- C4/Items.pm | 1 + C4/Letters.pm | 2 +- C4/Output.pm | 2 +- C4/Reserves.pm | 4 +++- C4/SIP/SIPServer.pm | 12 ++++++------ C4/Search.pm | 2 ++ C4/XSLT.pm | 1 - Koha/AuthUtils.pm | 2 +- Koha/Filter/MARC/ViewPolicy.pm | 4 ++-- Koha/Item/Search/Field.pm | 2 +- Koha/Item/Transfer.pm | 2 +- Koha/SearchEngine/Zebra/Search.pm | 4 ++-- acqui/addorderiso2709.pl | 2 +- acqui/neworderempty.pl | 2 +- authorities/authorities.pl | 2 +- cataloguing/addbiblio.pl | 2 +- misc/commit_file.pl | 2 +- misc/stage_file.pl | 2 +- t/lib/TestBuilder.pm | 1 - tools/manage-marc-import.pl | 2 +- tools/stage-marc-import.pl | 2 +- 28 files changed, 38 insertions(+), 33 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ffca3a4891b..5f0f350feec 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -67,7 +67,7 @@ BEGIN { @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash &get_all_subpermissions &get_user_subpermissions track_login_daily &in_iprange - &get_template_and_user + &get_template_and_user &haspermission ); $debug = $ENV{DEBUG}; diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 425fbd4820e..8fddcdf792d 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -63,6 +63,8 @@ BEGIN { TransformHtmlToMarc TransformHtmlToXml prepare_host_field + _disambiguate + TransformMarcToKohaOneField ); # Internal functions @@ -93,7 +95,7 @@ use C4::Charset qw( SetUTF8Flag SetMarcUnicodeFlag StripNonXmlChars nsb_clean ); use C4::Linker; use C4::OAI::Sets; use C4::Debug; -use C4::Items qw( sub GetHiddenItemnumbers GetMarcItem ); +use C4::Items qw( GetHiddenItemnumbers GetMarcItem ); use Koha::Caches; use Koha::Authority::Types; diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 0c3c2b5c676..18e9ca300a5 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -26,7 +26,7 @@ use C4::Koha qw( GetNormalizedISBN ); use C4::Charset qw( MarcToUTF8Record SetUTF8Flag ); use MARC::File::USMARC; use MARC::Field; -use C4::ImportBatch qw( sub GetZ3950BatchId AddBiblioToBatch AddAuthToBatch ); +use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch ); use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority use C4::Languages qw( getlanguage ); use Koha::Database; diff --git a/C4/Circulation.pm b/C4/Circulation.pm index e116c520fc9..1dc18022bcd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -29,7 +29,7 @@ use C4::Context; use C4::Stats; use C4::Reserves qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority RevertWaitingStatus IsItemOnHoldAndFound IsAvailableForItemLevelRequest ); use C4::Biblio qw( UpdateTotalIssues ModZebra ); -use C4::Items qw( sub ModItemTransfer ModDateLastSeen CartToShelf ); +use C4::Items qw( ModItemTransfer ModDateLastSeen CartToShelf ); use C4::Members; use C4::Accounts; use C4::ItemCirculationAlertPreference; @@ -123,6 +123,7 @@ BEGIN { &DeleteOfflineOperation &ProcessOfflineOperation ); + push @EXPORT_OK, '_GetCircControlBranch'; # This is wrong! } =head1 NAME diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index e766372b58e..dd8eac135ad 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -24,7 +24,6 @@ use warnings; use C4::Context; use C4::Search; -use C4::Items qw( sub ); use C4::Circulation qw( GetTransfers GetBranchItemRule ); use C4::Members; use C4::Biblio; diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 2c33f22dcca..d0b46441053 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -21,7 +21,7 @@ use strict; use warnings; use C4::Members; -use C4::Items qw( sub get_hostitemnumbers_of ); +use C4::Items qw( get_hostitemnumbers_of ); use C4::Circulation qw( CanBookBeRenewed barcodedecode CanBookBeIssued AddRenewal ); use C4::Accounts; use C4::Biblio qw( GetMarcBiblio ); diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 9bd20fd7945..4d511b19294 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -23,7 +23,7 @@ use warnings; use C4::Context; use C4::Koha qw( GetNormalizedISBN ); use C4::Biblio qw( AddBiblio ModBiblio GetMarcFromKohaField GetXmlBiblio TransformMarcToKoha DelBiblio ); -use C4::Items qw( sub ModItemFromMarc AddItemFromMarc ); +use C4::Items qw( ModItemFromMarc AddItemFromMarc ); use C4::Charset qw( SetUTF8Flag StripNonXmlChars MarcToUTF8Record ); use C4::AuthoritiesMarc; use C4::MarcModificationTemplates; diff --git a/C4/Items.pm b/C4/Items.pm index 001c2d9ffd4..b8f60372181 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -39,6 +39,7 @@ BEGIN { GetHostItemsInfo get_hostitemnumbers_of GetHiddenItemnumbers + GetMarcItem MoveItemFromBiblio CartToShelf GetAnalyticsCount diff --git a/C4/Letters.pm b/C4/Letters.pm index 8f1bdccf975..5f0381348e4 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -49,7 +49,7 @@ BEGIN { require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw( - &EnqueueLetter &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &SendAlerts &GetPrintMessages &GetMessageTransportTypes + &EnqueueLetter &getletter &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &SendAlerts &GetPrintMessages &GetMessageTransportTypes ); } diff --git a/C4/Output.pm b/C4/Output.pm index 1c7f2089d28..532d93be271 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -40,7 +40,7 @@ BEGIN { require Exporter; @ISA = qw(Exporter); - @EXPORT_OK, qw( + @EXPORT_OK = qw( is_ajax ajax_fail setlanguagecookie getlanguagecookie pagination_bar parametrized_url diff --git a/C4/Reserves.pm b/C4/Reserves.pm index fc24a0e45f9..c9cd387ca9b 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -27,7 +27,7 @@ use C4::Accounts; use C4::Biblio; use C4::Circulation qw( CheckIfIssuedToPatron checkHighHolds GetAgeRestriction GetBranchItemRule ); use C4::Context; -use C4::Items qw( sub get_hostitemnumbers_of ModItemTransfer CartToShelf ); +use C4::Items qw( get_hostitemnumbers_of ModItemTransfer CartToShelf ); use C4::Letters qw( GetPreparedLetter EnqueueLetter ); use C4::Log; use C4::Members::Messaging; @@ -141,6 +141,8 @@ BEGIN { GetMaxPatronHoldsForRecord MergeHolds + + RevertWaitingStatus ); } diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm index 41080d554e9..f1c1ae448b3 100644 --- a/C4/SIP/SIPServer.pm +++ b/C4/SIP/SIPServer.pm @@ -13,12 +13,12 @@ use Scalar::Util qw(blessed); require UNIVERSAL::require; use C4::Context; -use C4::SIP::Sip qw( siplog ); -use C4::SIP::Sip qw( siplog ); -use C4::SIP::Sip qw( siplog ); -use C4::SIP::Sip qw( siplog ); -use C4::SIP::Sip qw( siplog ); -use C4::SIP::Logger qw( set_logger ); +use C4::SIP::Sip qw(siplog); +use C4::SIP::Sip::Constants qw(:all); +use C4::SIP::Sip::Configuration; +use C4::SIP::Sip::Checksum qw(checksum verify_cksum); +use C4::SIP::Sip::MsgType qw( handle login_core ); +use C4::SIP::Logger qw(set_logger); use Koha::Caches; diff --git a/C4/Search.pm b/C4/Search.pm index 5589cfd30df..e55bee114cd 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -52,6 +52,8 @@ BEGIN { &buildQuery &GetDistinctValues &enabled_staff_search_views + &new_record_from_zebra + &z3950_search_args ); } diff --git a/C4/XSLT.pm b/C4/XSLT.pm index b290948c7b3..327068a20fe 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -24,7 +24,6 @@ package C4::XSLT; use Modern::Perl; use C4::Context; -use C4::Items qw( sub ); use C4::Koha qw( xml_escape ); use C4::Biblio qw( GetFrameworkCode GetMarcStructure GetAuthorisedValueDesc ); use C4::Circulation; diff --git a/Koha/AuthUtils.pm b/Koha/AuthUtils.pm index 2828833f698..9559adcf748 100644 --- a/Koha/AuthUtils.pm +++ b/Koha/AuthUtils.pm @@ -32,7 +32,7 @@ our (@ISA, @EXPORT_OK); BEGIN { require Exporter; @ISA = qw(Exporter); - @EXPORT_OK = qw(hash_password get_script_name); + @EXPORT_OK = qw(hash_password get_script_name is_password_valid); }; =head1 NAME diff --git a/Koha/Filter/MARC/ViewPolicy.pm b/Koha/Filter/MARC/ViewPolicy.pm index 1b7ef7468c4..01b2e68ef30 100644 --- a/Koha/Filter/MARC/ViewPolicy.pm +++ b/Koha/Filter/MARC/ViewPolicy.pm @@ -40,7 +40,7 @@ menu. use Modern::Perl; use Carp; -use C4::Biblio; +use C4::Biblio qw( GetMarcStructure ); use base qw(Koha::RecordProcessor::Base); our $NAME = 'MARC_ViewPolicy'; @@ -86,7 +86,7 @@ sub filter { my $result = $current_record; my $hide = _should_hide_on_interface(); - my $marcsubfieldstructure = GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } ); + my $marcsubfieldstructure = C4::Biblio::GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } ); #if ($marcsubfieldstructure->{'000'}->{'@'}->{hidden}>0) { # LDR field is excluded from $current_record->fields(). diff --git a/Koha/Item/Search/Field.pm b/Koha/Item/Search/Field.pm index c655949bb38..3e11a421465 100644 --- a/Koha/Item/Search/Field.pm +++ b/Koha/Item/Search/Field.pm @@ -6,7 +6,7 @@ our (@ISA, @EXPORT_OK); BEGIN { require Exporter @ISA = qw(Exporter); - @EXPORT_OK, qw( + @EXPORT_OK = qw( AddItemSearchField ModItemSearchField DelItemSearchField diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm index 469ee40fdfb..6d55b2819fd 100644 --- a/Koha/Item/Transfer.pm +++ b/Koha/Item/Transfer.pm @@ -20,7 +20,7 @@ use Modern::Perl; use Carp; use Try::Tiny; -use C4::Items qw( sub CartToShelf ModDateLastSeen ); +use C4::Items qw( CartToShelf ModDateLastSeen ); use Koha::Database; use Koha::DateUtils; diff --git a/Koha/SearchEngine/Zebra/Search.pm b/Koha/SearchEngine/Zebra/Search.pm index 850469ec5d8..1d504d384fd 100644 --- a/Koha/SearchEngine/Zebra/Search.pm +++ b/Koha/SearchEngine/Zebra/Search.pm @@ -21,7 +21,7 @@ use Modern::Perl; use base qw(Class::Accessor); -use C4::Search; # :( +use C4::Search qw( getRecords ); # :( use C4::AuthoritiesMarc; use Koha::SearchEngine::Search; @@ -62,7 +62,7 @@ This passes straight through to C4::Search::getRecords. sub search_compat { shift; # get rid of $self - return getRecords(@_); + return C4::Search::getRecords(@_); } =head2 simple_search_compat diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index 62f6a08e762..8bab1907a2f 100644 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -30,7 +30,7 @@ use Encode (); use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches sub SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); +use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); use C4::Matcher; use C4::Search qw( FindDuplicate ); use C4::Acquisition; diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 2b26d96b136..a147975f361 100644 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -88,7 +88,7 @@ use C4::Members; use C4::Search qw( FindDuplicate ); #needed for z3950 import: -use C4::ImportBatch qw( sub SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc ); +use C4::ImportBatch qw( SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc ); use Koha::Acquisition::Booksellers; use Koha::Acquisition::Currencies; diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 6845491ea6d..f4e3651b4ed 100644 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -24,7 +24,7 @@ use CGI qw ( -utf8 ); 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::ImportBatch qw( sub GetImportRecordMarc ); +use C4::ImportBatch qw( GetImportRecordMarc ); use C4::Context; use Date::Calc qw( Today ); use MARC::File::USMARC; diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 5f8119e9f2b..8b258155620 100644 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -42,7 +42,7 @@ use C4::Auth qw( get_template_and_user haspermission ); use C4::Context; use MARC::Record (); use C4::ClassSource qw( GetClassSources ); -use C4::ImportBatch qw( sub GetImportRecordMarc ); +use C4::ImportBatch qw( GetImportRecordMarc ); use C4::Charset qw( SetMarcUnicodeFlag ); use Koha::BiblioFrameworks; use Koha::DateUtils qw( dt_from_string ); diff --git a/misc/commit_file.pl b/misc/commit_file.pl index 86d76bfaa50..cf6ba9e3221 100644 --- a/misc/commit_file.pl +++ b/misc/commit_file.pl @@ -10,7 +10,7 @@ BEGIN { use Koha::Script; use C4::Context; -use C4::ImportBatch qw( GetImportBatch sub BatchCommitRecords BatchRevertRecords ); +use C4::ImportBatch qw( GetImportBatch BatchCommitRecords BatchRevertRecords ); use Getopt::Long qw( GetOptions ); $| = 1; diff --git a/misc/stage_file.pl b/misc/stage_file.pl index a7578d08b94..96abb2e1518 100644 --- a/misc/stage_file.pl +++ b/misc/stage_file.pl @@ -28,7 +28,7 @@ BEGIN { use Koha::Script; use C4::Context; -use C4::ImportBatch qw( sub RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates ); +use C4::ImportBatch qw( RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates ); use C4::Matcher; use C4::MarcModificationTemplates qw( GetModificationTemplates ); use Getopt::Long qw( GetOptions ); diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index 8ad3ae00bcd..59d01608f71 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -4,7 +4,6 @@ use Modern::Perl; use Koha::Database; use C4::Biblio qw( AddBiblio ); -use C4::Items qw( sub ); use Koha::Biblios; use Koha::Items; use Koha::DateUtils qw( dt_from_string ); diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl index 10df6505bb2..5a112f17945 100644 --- a/tools/manage-marc-import.pl +++ b/tools/manage-marc-import.pl @@ -30,7 +30,7 @@ use C4::Koha; use C4::Auth qw( get_template_and_user ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::ImportBatch qw( CleanBatch DeleteBatch sub GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords ); +use C4::ImportBatch qw( CleanBatch DeleteBatch GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords ); use C4::Matcher; use C4::BackgroundJob; use C4::Labels::Batch; diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl index b22c149d05a..21a72114446 100644 --- a/tools/stage-marc-import.pl +++ b/tools/stage-marc-import.pl @@ -35,7 +35,7 @@ use MARC::File::USMARC; use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction sub ); +use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction ); use C4::Matcher; use Koha::UploadedFiles; use C4::BackgroundJob; -- 2.20.1