Bugzilla – Attachment 124750 Details for
Bug 28931
use EXPORT_OK in Koha::DateUtils
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Bug-28931-Use-EXPORTOK-from-KohaAuthUtils.patch (text/plain), 30.26 KB, created by
Jonathan Druart
on 2021-09-10 11:07:15 UTC
(
hide
)
Description:
Bug 28931: Use EXPORT_OK from Koha::AuthUtils
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-09-10 11:07:15 UTC
Size:
30.26 KB
patch
obsolete
>From 0c9700ce89fa3d666b30ce61b731283247a554ff Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 10 Sep 2021 12:01:01 +0200 >Subject: [PATCH] Bug 28931: Use EXPORT_OK from Koha::AuthUtils > >It has been missed on bug 17600. >--- > C4/SIP/ILS/Item.pm | 2 +- > C4/SIP/ILS/Transaction.pm | 2 +- > Koha/DateUtils.pm | 16 +++++++++++----- > Koha/pdfformat/layout3pagesfr.pm | 2 +- > installer/data/mysql/updatedatabase.pl | 2 +- > opac/svc/checkout_notes | 2 +- > svc/checkouts | 2 +- > svc/holds | 2 +- > svc/return_claims | 2 +- > t/Calendar.t | 2 +- > t/Circulation/AgeRestrictionMarkers.t | 2 +- > t/DateUtils.t | 6 +++--- > t/db_dependent/Calendar.t | 2 +- > t/db_dependent/Circulation.t | 2 +- > t/db_dependent/Circulation/GetHardDueDate.t | 2 +- > .../Circulation/IssuingRules/maxsuspensiondays.t | 2 +- > t/db_dependent/Circulation/Returns.t | 2 +- > t/db_dependent/Circulation/StoreLastBorrower.t | 2 +- > t/db_dependent/Circulation/dateexpiry.t | 2 +- > t/db_dependent/Circulation/issue.t | 2 +- > t/db_dependent/Circulation/transfers.t | 2 +- > t/db_dependent/Contract.t | 2 +- > t/db_dependent/DecreaseLoanHighHolds.t | 2 +- > t/db_dependent/Fines.t | 2 +- > t/db_dependent/Hold.t | 2 +- > t/db_dependent/Holds/WaitingReserves.t | 2 +- > t/db_dependent/HoldsQueue.t | 2 +- > t/db_dependent/Holidays.t | 3 +-- > t/db_dependent/ILSDI_Services.t | 2 +- > .../Items/AutomaticItemModificationByAge.t | 2 +- > t/db_dependent/Koha/Acquisition/Booksellers.t | 2 +- > t/db_dependent/Koha/AdditionalContents.t | 2 +- > t/db_dependent/Koha/BackgroundJobs.t | 2 +- > t/db_dependent/Koha/Item.t | 2 +- > t/db_dependent/Koha/Item/Transfer.t | 2 +- > t/db_dependent/Koha/Item/Transfers.t | 2 +- > t/db_dependent/Koha/Patron/Categories.t | 2 +- > t/db_dependent/Koha/Patrons.t | 2 +- > t/db_dependent/Koha/Suggestions.t | 2 +- > t/db_dependent/Letters/TemplateToolkit.t | 2 +- > t/db_dependent/OAI/Server.t | 2 +- > t/db_dependent/Passwordrecovery.t | 2 +- > t/db_dependent/Patron/Borrower_PrevCheckout.t | 2 +- > t/db_dependent/Patrons.t | 2 +- > t/db_dependent/Reserves.t | 2 +- > t/db_dependent/Reserves/AutoUnsuspendReserves.t | 2 +- > t/db_dependent/Reserves/CancelExpiredReserves.t | 2 +- > t/db_dependent/SIP/Message.t | 2 +- > t/db_dependent/SIP/Patron.t | 2 +- > t/db_dependent/Search/History.t | 2 +- > t/db_dependent/Serials.t | 2 +- > t/db_dependent/Sitemapper.t | 2 +- > t/db_dependent/StockRotationItems.t | 2 +- > t/db_dependent/Template/Plugin/KohaDates.t | 2 +- > t/db_dependent/Upload.t | 3 +-- > t/db_dependent/Virtualshelves.t | 2 +- > t/db_dependent/api/v1/checkouts.t | 2 +- > t/db_dependent/api/v1/holds.t | 2 +- > t/db_dependent/cronjobs/advance_notices_digest.t | 2 +- > t/db_dependent/rollingloans.t | 2 +- > tools/additional-contents.pl | 3 ++- > 61 files changed, 74 insertions(+), 69 deletions(-) > >diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm >index 48df606cad1..d57947a3686 100644 >--- a/C4/SIP/ILS/Item.pm >+++ b/C4/SIP/ILS/Item.pm >@@ -26,7 +26,7 @@ use Koha::Biblios; > use Koha::Checkouts::ReturnClaims; > use Koha::Checkouts; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Holds; > use Koha::Items; > use Koha::Patrons; >diff --git a/C4/SIP/ILS/Transaction.pm b/C4/SIP/ILS/Transaction.pm >index 011aa980b3b..fade710a040 100644 >--- a/C4/SIP/ILS/Transaction.pm >+++ b/C4/SIP/ILS/Transaction.pm >@@ -8,7 +8,7 @@ use Carp; > use strict; > use warnings; > use C4::Context; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Checkouts; > > my %fields = ( >diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm >index 9b599e3c6d5..f5becf04056 100644 >--- a/Koha/DateUtils.pm >+++ b/Koha/DateUtils.pm >@@ -21,11 +21,17 @@ use DateTime; > use C4::Context; > use Koha::Exceptions; > >-use base 'Exporter'; >- >-our @EXPORT = ( >- qw( dt_from_string output_pref format_sqldatetime ) >-); >+use vars qw(@ISA @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ >+ @EXPORT_OK = qw( >+ dt_from_string >+ output_pref >+ format_sqldatetime >+ ); >+} > > =head1 DateUtils > >diff --git a/Koha/pdfformat/layout3pagesfr.pm b/Koha/pdfformat/layout3pagesfr.pm >index 1003583b6d9..84270b9fd16 100644 >--- a/Koha/pdfformat/layout3pagesfr.pm >+++ b/Koha/pdfformat/layout3pagesfr.pm >@@ -29,7 +29,7 @@ use utf8; > > use C4::Acquisition; > use Koha::Number::Price; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Libraries; > > BEGIN { >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 4f89a31f604..1ea8f64bb3a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -40,7 +40,7 @@ use C4::Context; > use C4::Installer; > use Koha::Database; > use Koha; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > use MARC::Record; > use MARC::File::XML ( BinaryEncoding => 'utf8' ); >diff --git a/opac/svc/checkout_notes b/opac/svc/checkout_notes >index fea4a9e67ae..dd4fb83b4ea 100755 >--- a/opac/svc/checkout_notes >+++ b/opac/svc/checkout_notes >@@ -29,7 +29,7 @@ use C4::Scrubber; > use C4::Circulation; > use C4::Biblio; > use Koha::Checkouts; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Patrons; > > =head1 NAME >diff --git a/svc/checkouts b/svc/checkouts >index 38c0017e2c7..b8b5bdf1093 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -28,7 +28,7 @@ use C4::Overdues qw(GetFine); > use C4::Context; > > use Koha::AuthorisedValues; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::ItemTypes; > > my $input = CGI->new; >diff --git a/svc/holds b/svc/holds >index 5e0a9d91fbd..90a2ad74b34 100755 >--- a/svc/holds >+++ b/svc/holds >@@ -27,7 +27,7 @@ use C4::Charset; > use C4::Circulation qw(GetTransfers); > use C4::Context; > >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Holds; > use Koha::ItemTypes; > use Koha::Libraries; >diff --git a/svc/return_claims b/svc/return_claims >index 2a616f08e28..a19f8616602 100755 >--- a/svc/return_claims >+++ b/svc/return_claims >@@ -26,7 +26,7 @@ use C4::Auth qw(check_cookie_auth haspermission get_session); > use C4::Context; > > use Koha::AuthorisedValues; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Patrons; > > my $input = CGI->new; >diff --git a/t/Calendar.t b/t/Calendar.t >index 89650873011..d560b68a16f 100755 >--- a/t/Calendar.t >+++ b/t/Calendar.t >@@ -23,7 +23,7 @@ use Test::MockModule; > use DateTime; > use DateTime::Duration; > use Koha::Caches; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::Mocks; > >diff --git a/t/Circulation/AgeRestrictionMarkers.t b/t/Circulation/AgeRestrictionMarkers.t >index a658d35977e..4688751dbe7 100755 >--- a/t/Circulation/AgeRestrictionMarkers.t >+++ b/t/Circulation/AgeRestrictionMarkers.t >@@ -21,7 +21,7 @@ > use Modern::Perl; > > use DateTime; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Test::More tests => 8; > use Test::Warn; > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index 5b00c771247..128ae3b86d7 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -4,16 +4,16 @@ use DateTime::TimeZone; > > use C4::Context; > >-use Test::More tests => 79; >+use Test::More tests => 78; > > use Test::MockModule; > use Test::Warn; > use Time::HiRes qw/ gettimeofday /; > use Try::Tiny; > >-use t::lib::Mocks; >+use Koha::DateUtils qw( dt_from_string output_pref format_sqldatetime ); > >-BEGIN { use_ok('Koha::DateUtils'); } >+use t::lib::Mocks; > > t::lib::Mocks::mock_preference('dateformat', 'us'); > t::lib::Mocks::mock_preference('TimeFormat', 'This_is_not_used_but_called'); >diff --git a/t/db_dependent/Calendar.t b/t/db_dependent/Calendar.t >index 0900b5719d4..4b8a7057c26 100755 >--- a/t/db_dependent/Calendar.t >+++ b/t/db_dependent/Calendar.t >@@ -25,7 +25,7 @@ use t::lib::TestBuilder; > > use DateTime; > use Koha::Caches; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use_ok('Koha::Calendar'); > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index e054c74ab56..e8a2d144a1f 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -39,7 +39,7 @@ use C4::Items qw( ModItemTransfer ); > use C4::Log; > use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll ModReserveAffect CheckReserves GetOtherReserves ); > use C4::Overdues qw( CalcFine UpdateFine get_chargeable_units ); >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Database; > use Koha::Items; > use Koha::Item::Transfers; >diff --git a/t/db_dependent/Circulation/GetHardDueDate.t b/t/db_dependent/Circulation/GetHardDueDate.t >index f68b98c20dd..5f11511730f 100755 >--- a/t/db_dependent/Circulation/GetHardDueDate.t >+++ b/t/db_dependent/Circulation/GetHardDueDate.t >@@ -4,7 +4,7 @@ use Modern::Perl; > use C4::Context; > use DateTime; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::CirculationRules; > use Koha::Library; > >diff --git a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t b/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >index bdb9d5aee61..0660b274153 100755 >--- a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >+++ b/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >@@ -8,7 +8,7 @@ use C4::Context; > use C4::Circulation qw( AddIssue AddReturn ); > use C4::Biblio qw( AddBiblio ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Patron::Debarments qw( GetDebarments DelDebarment ); > use Koha::Patrons; > >diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t >index c361d3c1651..f2dc1949814 100755 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -30,7 +30,7 @@ use C4::Items; > use C4::Biblio qw( AddBiblio ); > use Koha::Database; > use Koha::Account::Lines; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > use Koha::Patrons; > >diff --git a/t/db_dependent/Circulation/StoreLastBorrower.t b/t/db_dependent/Circulation/StoreLastBorrower.t >index b6770d8e061..b5c12b7e6bf 100755 >--- a/t/db_dependent/Circulation/StoreLastBorrower.t >+++ b/t/db_dependent/Circulation/StoreLastBorrower.t >@@ -22,7 +22,7 @@ use Test::More tests => 1; > use C4::Circulation qw( AddReturn ); > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > > use t::lib::Mocks; >diff --git a/t/db_dependent/Circulation/dateexpiry.t b/t/db_dependent/Circulation/dateexpiry.t >index 599abfa93df..85337941413 100755 >--- a/t/db_dependent/Circulation/dateexpiry.t >+++ b/t/db_dependent/Circulation/dateexpiry.t >@@ -21,7 +21,7 @@ use DateTime; > use Time::HiRes qw/gettimeofday time/; > use Test::More tests => 2; > use C4::Members; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Database; > > use t::lib::TestBuilder; >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index d4fb82b55b7..1ef8c7ed6d0 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -30,7 +30,7 @@ use C4::Items; > use C4::Reserves qw( AddReserve ); > use Koha::Checkouts; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Holds; > use Koha::Items; > use Koha::Library; >diff --git a/t/db_dependent/Circulation/transfers.t b/t/db_dependent/Circulation/transfers.t >index 99767c8798e..e03b54fc022 100755 >--- a/t/db_dependent/Circulation/transfers.t >+++ b/t/db_dependent/Circulation/transfers.t >@@ -21,7 +21,7 @@ use C4::Circulation qw( CreateBranchTransferLimit DeleteBranchTransferLimits Get > use C4::Biblio qw( AddBiblio ); > use C4::Items qw( ModItemTransfer ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use DateTime::Duration; > use Koha::Item::Transfers; > >diff --git a/t/db_dependent/Contract.t b/t/db_dependent/Contract.t >index 7ce9d34ac7d..e1af15b19cc 100755 >--- a/t/db_dependent/Contract.t >+++ b/t/db_dependent/Contract.t >@@ -21,7 +21,7 @@ use Modern::Perl; > > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Acquisition::Booksellers; > > use DateTime::Duration; >diff --git a/t/db_dependent/DecreaseLoanHighHolds.t b/t/db_dependent/DecreaseLoanHighHolds.t >index 8bb0fdce6eb..8722a5c907f 100755 >--- a/t/db_dependent/DecreaseLoanHighHolds.t >+++ b/t/db_dependent/DecreaseLoanHighHolds.t >@@ -20,7 +20,7 @@ use DateTime; > > use C4::Circulation qw( CalcDateDue checkHighHolds CanBookBeIssued ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Patrons; > use Koha::Biblio; > use Koha::Item; >diff --git a/t/db_dependent/Fines.t b/t/db_dependent/Fines.t >index fef8a939afa..b604a3374ad 100755 >--- a/t/db_dependent/Fines.t >+++ b/t/db_dependent/Fines.t >@@ -5,7 +5,7 @@ use Modern::Perl; > use C4::Context; > use C4::Overdues qw( CalcFine ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use Test::More tests => 5; > >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index fb983caca5c..abeae5cc7a9 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -26,7 +26,7 @@ use C4::Calendar qw( new insert_single_holiday ); > use Koha::Patrons; > use Koha::Holds; > use Koha::Item; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use t::lib::TestBuilder; > > use Test::More tests => 34; >diff --git a/t/db_dependent/Holds/WaitingReserves.t b/t/db_dependent/Holds/WaitingReserves.t >index 7536b30b480..feeaf40716b 100755 >--- a/t/db_dependent/Holds/WaitingReserves.t >+++ b/t/db_dependent/Holds/WaitingReserves.t >@@ -3,7 +3,7 @@ > use Modern::Perl; > > use C4::Reserves qw( ModReserve ModReserveAffect ); >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::Mocks; > use t::lib::TestBuilder; >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 30f4ec3eae2..51d57b834a3 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -16,7 +16,7 @@ use C4::Context; > use C4::Members; > use C4::Circulation qw( AddIssue AddReturn ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > use Koha::Holds; > use Koha::CirculationRules; >diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t >index 677c4cc1f32..607906a1697 100755 >--- a/t/db_dependent/Holidays.t >+++ b/t/db_dependent/Holidays.t >@@ -25,8 +25,7 @@ use DateTime::TimeZone; > use t::lib::TestBuilder; > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >- >+use Koha::DateUtils qw( dt_from_string ); > > BEGIN { > use_ok('Koha::Calendar'); >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 72681afd699..0aa7be657a0 100755 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -29,7 +29,7 @@ use C4::Items qw( ModItemTransfer ); > use C4::Circulation qw( AddIssue ); > > use Koha::AuthUtils; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > BEGIN { > use_ok('C4::ILSDI::Services', qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan )); >diff --git a/t/db_dependent/Items/AutomaticItemModificationByAge.t b/t/db_dependent/Items/AutomaticItemModificationByAge.t >index 0c1b044b384..db162d69649 100755 >--- a/t/db_dependent/Items/AutomaticItemModificationByAge.t >+++ b/t/db_dependent/Items/AutomaticItemModificationByAge.t >@@ -10,7 +10,7 @@ use DateTime::Duration; > use C4::Items qw( GetMarcItem ToggleNewStatus ); > use C4::Biblio qw( AddBiblio GetMarcFromKohaField ); > use C4::Context; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > use t::lib::Mocks; > use t::lib::TestBuilder; >diff --git a/t/db_dependent/Koha/Acquisition/Booksellers.t b/t/db_dependent/Koha/Acquisition/Booksellers.t >index 9025f1cc81d..c3b8c1bd6b1 100755 >--- a/t/db_dependent/Koha/Acquisition/Booksellers.t >+++ b/t/db_dependent/Koha/Acquisition/Booksellers.t >@@ -28,7 +28,7 @@ use C4::Serials qw( NewSubscription SearchSubscriptions ); > > use Koha::Acquisition::Booksellers; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > my $schema = Koha::Database->schema(); > my $builder = t::lib::TestBuilder->new; >diff --git a/t/db_dependent/Koha/AdditionalContents.t b/t/db_dependent/Koha/AdditionalContents.t >index 80fb4c60cf1..ac9f998cb1c 100755 >--- a/t/db_dependent/Koha/AdditionalContents.t >+++ b/t/db_dependent/Koha/AdditionalContents.t >@@ -24,7 +24,7 @@ use Test::Exception; > > use Koha::AdditionalContents; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::TestBuilder; > >diff --git a/t/db_dependent/Koha/BackgroundJobs.t b/t/db_dependent/Koha/BackgroundJobs.t >index f678e206357..63c32e08458 100755 >--- a/t/db_dependent/Koha/BackgroundJobs.t >+++ b/t/db_dependent/Koha/BackgroundJobs.t >@@ -25,7 +25,7 @@ use JSON qw( decode_json ); > > use Koha::Database; > use Koha::BackgroundJobs; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::TestBuilder; > use t::lib::Mocks; >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index e9cc993cd75..9f58f089c55 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -27,7 +27,7 @@ use C4::Circulation qw( AddIssue AddReturn ); > > use Koha::Items; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Old::Items; > > use List::MoreUtils qw(all); >diff --git a/t/db_dependent/Koha/Item/Transfer.t b/t/db_dependent/Koha/Item/Transfer.t >index 54b82084194..2ac3462351e 100755 >--- a/t/db_dependent/Koha/Item/Transfer.t >+++ b/t/db_dependent/Koha/Item/Transfer.t >@@ -20,7 +20,7 @@ > use Modern::Perl; > > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::TestBuilder; > >diff --git a/t/db_dependent/Koha/Item/Transfers.t b/t/db_dependent/Koha/Item/Transfers.t >index 03ed3cf3aa2..324842b637c 100755 >--- a/t/db_dependent/Koha/Item/Transfers.t >+++ b/t/db_dependent/Koha/Item/Transfers.t >@@ -24,7 +24,7 @@ use Test::More tests => 3; > use Koha::Item::Transfer; > use Koha::Item::Transfers; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::TestBuilder; > use t::lib::Dates; >diff --git a/t/db_dependent/Koha/Patron/Categories.t b/t/db_dependent/Koha/Patron/Categories.t >index 906d897a87a..f6cdba7e248 100755 >--- a/t/db_dependent/Koha/Patron/Categories.t >+++ b/t/db_dependent/Koha/Patron/Categories.t >@@ -23,7 +23,7 @@ use Test::More tests => 10; > > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Patron::Category; > use Koha::Patron::Categories; > use t::lib::Dates; >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 152b80c35b9..390d9d3e663 100755 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -42,7 +42,7 @@ use Koha::Patron::Attribute::Types; > use Koha::Patron::Categories; > use Koha::Patron::Relationship; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Virtualshelves; > use Koha::Notice::Messages; > >diff --git a/t/db_dependent/Koha/Suggestions.t b/t/db_dependent/Koha/Suggestions.t >index ae93073e897..9cd1bff8c0f 100755 >--- a/t/db_dependent/Koha/Suggestions.t >+++ b/t/db_dependent/Koha/Suggestions.t >@@ -25,7 +25,7 @@ use Test::Exception; > use Koha::Suggestion; > use Koha::Suggestions; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > use t::lib::TestBuilder; > >diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t >index 04658e78999..127a98bd117 100755 >--- a/t/db_dependent/Letters/TemplateToolkit.t >+++ b/t/db_dependent/Letters/TemplateToolkit.t >@@ -33,7 +33,7 @@ use C4::Letters qw( GetPreparedLetter ); > use C4::Members qw( IssueSlip ); > use C4::Biblio; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::ArticleRequests; > use Koha::Biblio; > use Koha::Biblioitem; >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 4c3e641583b..8f52645edbc 100755 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -38,7 +38,7 @@ use C4::OAI::Sets qw(AddOAISet); > > use Koha::Biblio::Metadatas; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > BEGIN { > use_ok('Koha::OAI::Server::DeletedRecord'); >diff --git a/t/db_dependent/Passwordrecovery.t b/t/db_dependent/Passwordrecovery.t >index 0f33acb0ea0..36bde4c780b 100755 >--- a/t/db_dependent/Passwordrecovery.t >+++ b/t/db_dependent/Passwordrecovery.t >@@ -20,7 +20,7 @@ use Modern::Perl; > use C4::Context; > use C4::Letters qw( GetQueuedMessages ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Patrons; > > use t::lib::TestBuilder; >diff --git a/t/db_dependent/Patron/Borrower_PrevCheckout.t b/t/db_dependent/Patron/Borrower_PrevCheckout.t >index 3b12f70878a..ca10733a603 100755 >--- a/t/db_dependent/Patron/Borrower_PrevCheckout.t >+++ b/t/db_dependent/Patron/Borrower_PrevCheckout.t >@@ -4,7 +4,7 @@ use Modern::Perl; > use C4::Members; > use C4::Circulation qw( AddIssue AddReturn CanBookBeIssued ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Patrons; > > use Test::More tests => 61; >diff --git a/t/db_dependent/Patrons.t b/t/db_dependent/Patrons.t >index 7a5eee1cfc9..5fde05614d4 100755 >--- a/t/db_dependent/Patrons.t >+++ b/t/db_dependent/Patrons.t >@@ -22,7 +22,7 @@ use Test::Warn; > > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > use t::lib::Dates; > use t::lib::TestBuilder; >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index e748f115f48..9b4122dbd45 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -34,7 +34,7 @@ use C4::Members; > use C4::Reserves qw( AddReserve CheckReserves GetReservesControlBranch ModReserve ModReserveAffect ReserveSlip CalculatePriority CanReserveBeCanceledFromOpac CanBookBeReserved IsAvailableForItemLevelRequest MoveReserve ChargeReserveFee RevertWaitingStatus CanItemBeReserved MergeHolds ); > use Koha::ActionLogs; > use Koha::Caches; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Holds; > use Koha::Items; > use Koha::Libraries; >diff --git a/t/db_dependent/Reserves/AutoUnsuspendReserves.t b/t/db_dependent/Reserves/AutoUnsuspendReserves.t >index 4d24794825d..e1fefc9fd59 100755 >--- a/t/db_dependent/Reserves/AutoUnsuspendReserves.t >+++ b/t/db_dependent/Reserves/AutoUnsuspendReserves.t >@@ -24,7 +24,7 @@ use t::lib::TestBuilder; > > use C4::Reserves qw( AutoUnsuspendReserves ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Holds; > > my $schema = Koha::Database->new->schema; >diff --git a/t/db_dependent/Reserves/CancelExpiredReserves.t b/t/db_dependent/Reserves/CancelExpiredReserves.t >index 27a583b6f1a..3b1480c0b3a 100755 >--- a/t/db_dependent/Reserves/CancelExpiredReserves.t >+++ b/t/db_dependent/Reserves/CancelExpiredReserves.t >@@ -9,7 +9,7 @@ use t::lib::TestBuilder; > use C4::Members; > use C4::Reserves qw( CancelExpiredReserves ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Holds; > > my $schema = Koha::Database->new->schema; >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 790248b748c..0fbfd81a890 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -34,7 +34,7 @@ use C4::Reserves qw( AddReserve ); > use C4::Circulation qw( AddReturn ); > use Koha::Database; > use Koha::AuthUtils qw(hash_password); >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Items; > use Koha::Checkouts; > use Koha::Old::Checkouts; >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index ced751aa99b..9106b1e7393 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -12,7 +12,7 @@ use t::lib::TestBuilder; > use C4::SIP::ILS::Patron; > use Koha::Account::Lines; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Patron::Attributes; > use Koha::Patrons; > >diff --git a/t/db_dependent/Search/History.t b/t/db_dependent/Search/History.t >index 56946945349..4c084e121a4 100755 >--- a/t/db_dependent/Search/History.t >+++ b/t/db_dependent/Search/History.t >@@ -17,7 +17,7 @@ use URI::Escape; > use List::Util qw( shuffle ); > > use C4::Context; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index 925a7502502..816a8a9714d 100755 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -12,7 +12,7 @@ use C4::Biblio qw( AddBiblio GetMarcFromKohaField ); > use C4::Budgets qw( AddBudgetPeriod AddBudget ); > use C4::Items qw( AddItemFromMarc ); > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Acquisition::Booksellers; > use t::lib::Mocks; > use t::lib::TestBuilder; >diff --git a/t/db_dependent/Sitemapper.t b/t/db_dependent/Sitemapper.t >index fe559c1308a..ae3dbeba3fd 100755 >--- a/t/db_dependent/Sitemapper.t >+++ b/t/db_dependent/Sitemapper.t >@@ -21,7 +21,7 @@ use Modern::Perl; > use File::Basename; > use File::Path; > use DateTime; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Test::MockModule; > use Test::More tests => 16; > use Carp qw/croak carp/; >diff --git a/t/db_dependent/StockRotationItems.t b/t/db_dependent/StockRotationItems.t >index bce77285667..715f78a0681 100755 >--- a/t/db_dependent/StockRotationItems.t >+++ b/t/db_dependent/StockRotationItems.t >@@ -22,7 +22,7 @@ use Modern::Perl; > use DateTime; > use DateTime::Duration; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Item::Transfer; > > use Test::Warn; >diff --git a/t/db_dependent/Template/Plugin/KohaDates.t b/t/db_dependent/Template/Plugin/KohaDates.t >index e40c79565e9..5d7300c6f50 100755 >--- a/t/db_dependent/Template/Plugin/KohaDates.t >+++ b/t/db_dependent/Template/Plugin/KohaDates.t >@@ -3,7 +3,7 @@ > use Modern::Perl; > > use C4::Context; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > use Test::MockModule; > use Test::More tests => 9; >diff --git a/t/db_dependent/Upload.t b/t/db_dependent/Upload.t >index 9d535dd2be2..8c672ea1997 100755 >--- a/t/db_dependent/Upload.t >+++ b/t/db_dependent/Upload.t >@@ -12,8 +12,7 @@ use t::lib::TestBuilder; > > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >-use Koha::UploadedFile; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::UploadedFiles; > use Koha::Uploader; > >diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t >index d349b7b39b0..443f97ad1e1 100755 >--- a/t/db_dependent/Virtualshelves.t >+++ b/t/db_dependent/Virtualshelves.t >@@ -6,7 +6,7 @@ use DateTime::Duration; > > use C4::Context; > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Virtualshelves; > use Koha::Virtualshelfshares; > use Koha::Virtualshelfcontents; >diff --git a/t/db_dependent/api/v1/checkouts.t b/t/db_dependent/api/v1/checkouts.t >index abd32a4629b..404b2a7190f 100755 >--- a/t/db_dependent/api/v1/checkouts.t >+++ b/t/db_dependent/api/v1/checkouts.t >@@ -29,7 +29,7 @@ use C4::Context; > use C4::Circulation qw( AddIssue AddReturn ); > > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > > my $schema = Koha::Database->schema; > my $builder = t::lib::TestBuilder->new; >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index 5abba547396..ac188772729 100755 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -32,7 +32,7 @@ use C4::Reserves qw( AddReserve CanItemBeReserved CanBookBeReserved ); > use C4::Items; > > use Koha::Database; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); > use Koha::Biblios; > use Koha::Biblioitems; > use Koha::Items; >diff --git a/t/db_dependent/cronjobs/advance_notices_digest.t b/t/db_dependent/cronjobs/advance_notices_digest.t >index 3fa10ec8df4..b912f2a631d 100755 >--- a/t/db_dependent/cronjobs/advance_notices_digest.t >+++ b/t/db_dependent/cronjobs/advance_notices_digest.t >@@ -25,7 +25,7 @@ use t::lib::Mocks; > use File::Spec; > use File::Basename; > >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > > my $scriptDir = dirname(File::Spec->rel2abs( __FILE__ )); > >diff --git a/t/db_dependent/rollingloans.t b/t/db_dependent/rollingloans.t >index f72fa9fcbf0..c997cc90fae 100755 >--- a/t/db_dependent/rollingloans.t >+++ b/t/db_dependent/rollingloans.t >@@ -5,7 +5,7 @@ use C4::Context; > use C4::Circulation qw( CanBookBeIssued AddIssue AddReturn ); > use C4::Members; > use C4::Items; >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Libraries; > use Koha::Patrons; > use t::lib::TestBuilder; >diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl >index e4a409cb688..45f6d17a2a5 100755 >--- a/tools/additional-contents.pl >+++ b/tools/additional-contents.pl >@@ -29,7 +29,8 @@ use C4::Koha; > use C4::Context; > use C4::Output qw(output_html_with_http_headers); > use C4::Languages qw(getTranslatedLanguages); >-use Koha::DateUtils; >+use Koha::DateUtils qw( dt_from_string output_pref ); >+ > use Koha::AdditionalContents; > > my $cgi = CGI->new; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28931
:
124283
|
124750
|
124870
|
125686
|
125857
|
125858