View | Details | Raw Unified | Return to bug 28931
Collapse All | Expand All

(-)a/C4/SIP/ILS/Item.pm (-1 / +1 lines)
Lines 26-32 use Koha::Biblios; Link Here
26
use Koha::Checkouts::ReturnClaims;
26
use Koha::Checkouts::ReturnClaims;
27
use Koha::Checkouts;
27
use Koha::Checkouts;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Holds;
30
use Koha::Holds;
31
use Koha::Items;
31
use Koha::Items;
32
use Koha::Patrons;
32
use Koha::Patrons;
(-)a/C4/SIP/ILS/Transaction.pm (-1 / +1 lines)
Lines 8-14 use Carp; Link Here
8
use strict;
8
use strict;
9
use warnings;
9
use warnings;
10
use C4::Context;
10
use C4::Context;
11
use Koha::DateUtils;
11
use Koha::DateUtils qw( dt_from_string );
12
use Koha::Checkouts;
12
use Koha::Checkouts;
13
13
14
my %fields = (
14
my %fields = (
(-)a/Koha/DateUtils.pm (-5 / +11 lines)
Lines 21-31 use DateTime; Link Here
21
use C4::Context;
21
use C4::Context;
22
use Koha::Exceptions;
22
use Koha::Exceptions;
23
23
24
use base 'Exporter';
24
use vars qw(@ISA @EXPORT_OK);
25
25
BEGIN {
26
our @EXPORT = (
26
    require Exporter;
27
    qw( dt_from_string output_pref format_sqldatetime )
27
    @ISA = qw(Exporter);
28
);
28
29
    @EXPORT_OK = qw(
30
        dt_from_string
31
        output_pref
32
        format_sqldatetime
33
    );
34
}
29
35
30
=head1 DateUtils
36
=head1 DateUtils
31
37
(-)a/Koha/pdfformat/layout3pagesfr.pm (-1 / +1 lines)
Lines 29-35 use utf8; Link Here
29
29
30
use C4::Acquisition;
30
use C4::Acquisition;
31
use Koha::Number::Price;
31
use Koha::Number::Price;
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::Libraries;
33
use Koha::Libraries;
34
34
35
BEGIN {
35
BEGIN {
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 40-46 use C4::Context; Link Here
40
use C4::Installer;
40
use C4::Installer;
41
use Koha::Database;
41
use Koha::Database;
42
use Koha;
42
use Koha;
43
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string output_pref );
44
44
45
use MARC::Record;
45
use MARC::Record;
46
use MARC::File::XML ( BinaryEncoding => 'utf8' );
46
use MARC::File::XML ( BinaryEncoding => 'utf8' );
(-)a/opac/svc/checkout_notes (-1 / +1 lines)
Lines 29-35 use C4::Scrubber; Link Here
29
use C4::Circulation;
29
use C4::Circulation;
30
use C4::Biblio;
30
use C4::Biblio;
31
use Koha::Checkouts;
31
use Koha::Checkouts;
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string );
33
use Koha::Patrons;
33
use Koha::Patrons;
34
34
35
=head1 NAME
35
=head1 NAME
(-)a/svc/checkouts (-1 / +1 lines)
Lines 28-34 use C4::Overdues qw(GetFine); Link Here
28
use C4::Context;
28
use C4::Context;
29
29
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
33
34
my $input = CGI->new;
34
my $input = CGI->new;
(-)a/svc/holds (-1 / +1 lines)
Lines 27-33 use C4::Charset; Link Here
27
use C4::Circulation qw(GetTransfers);
27
use C4::Circulation qw(GetTransfers);
28
use C4::Context;
28
use C4::Context;
29
29
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Holds;
31
use Koha::Holds;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::Libraries;
33
use Koha::Libraries;
(-)a/svc/return_claims (-1 / +1 lines)
Lines 26-32 use C4::Auth qw(check_cookie_auth haspermission get_session); Link Here
26
use C4::Context;
26
use C4::Context;
27
27
28
use Koha::AuthorisedValues;
28
use Koha::AuthorisedValues;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Patrons;
30
use Koha::Patrons;
31
31
32
my $input = CGI->new;
32
my $input = CGI->new;
(-)a/t/Calendar.t (-1 / +1 lines)
Lines 23-29 use Test::MockModule; Link Here
23
use DateTime;
23
use DateTime;
24
use DateTime::Duration;
24
use DateTime::Duration;
25
use Koha::Caches;
25
use Koha::Caches;
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
27
28
use t::lib::Mocks;
28
use t::lib::Mocks;
29
29
(-)a/t/Circulation/AgeRestrictionMarkers.t (-1 / +1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use DateTime;
23
use DateTime;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
use Test::More tests => 8;
25
use Test::More tests => 8;
26
use Test::Warn;
26
use Test::Warn;
27
27
(-)a/t/DateUtils.t (-3 / +3 lines)
Lines 4-19 use DateTime::TimeZone; Link Here
4
4
5
use C4::Context;
5
use C4::Context;
6
6
7
use Test::More tests => 79;
7
use Test::More tests => 78;
8
8
9
use Test::MockModule;
9
use Test::MockModule;
10
use Test::Warn;
10
use Test::Warn;
11
use Time::HiRes qw/ gettimeofday /;
11
use Time::HiRes qw/ gettimeofday /;
12
use Try::Tiny;
12
use Try::Tiny;
13
13
14
use t::lib::Mocks;
14
use Koha::DateUtils qw( dt_from_string output_pref format_sqldatetime );
15
15
16
BEGIN { use_ok('Koha::DateUtils'); }
16
use t::lib::Mocks;
17
17
18
t::lib::Mocks::mock_preference('dateformat', 'us');
18
t::lib::Mocks::mock_preference('dateformat', 'us');
19
t::lib::Mocks::mock_preference('TimeFormat', 'This_is_not_used_but_called');
19
t::lib::Mocks::mock_preference('TimeFormat', 'This_is_not_used_but_called');
(-)a/t/db_dependent/Calendar.t (-1 / +1 lines)
Lines 25-31 use t::lib::TestBuilder; Link Here
25
25
26
use DateTime;
26
use DateTime;
27
use Koha::Caches;
27
use Koha::Caches;
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
29
29
30
use_ok('Koha::Calendar');
30
use_ok('Koha::Calendar');
31
31
(-)a/t/db_dependent/Circulation.t (-1 / +1 lines)
Lines 39-45 use C4::Items qw( ModItemTransfer ); Link Here
39
use C4::Log;
39
use C4::Log;
40
use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll ModReserveAffect CheckReserves GetOtherReserves );
40
use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll ModReserveAffect CheckReserves GetOtherReserves );
41
use C4::Overdues qw( CalcFine UpdateFine get_chargeable_units );
41
use C4::Overdues qw( CalcFine UpdateFine get_chargeable_units );
42
use Koha::DateUtils;
42
use Koha::DateUtils qw( dt_from_string output_pref );
43
use Koha::Database;
43
use Koha::Database;
44
use Koha::Items;
44
use Koha::Items;
45
use Koha::Item::Transfers;
45
use Koha::Item::Transfers;
(-)a/t/db_dependent/Circulation/GetHardDueDate.t (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
use C4::Context;
4
use C4::Context;
5
use DateTime;
5
use DateTime;
6
use Koha::Database;
6
use Koha::Database;
7
use Koha::DateUtils;
7
use Koha::DateUtils qw( dt_from_string );
8
use Koha::CirculationRules;
8
use Koha::CirculationRules;
9
use Koha::Library;
9
use Koha::Library;
10
10
(-)a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t (-1 / +1 lines)
Lines 8-14 use C4::Context; Link Here
8
use C4::Circulation qw( AddIssue AddReturn );
8
use C4::Circulation qw( AddIssue AddReturn );
9
use C4::Biblio qw( AddBiblio );
9
use C4::Biblio qw( AddBiblio );
10
use Koha::Database;
10
use Koha::Database;
11
use Koha::DateUtils;
11
use Koha::DateUtils qw( dt_from_string output_pref );
12
use Koha::Patron::Debarments qw( GetDebarments DelDebarment );
12
use Koha::Patron::Debarments qw( GetDebarments DelDebarment );
13
use Koha::Patrons;
13
use Koha::Patrons;
14
14
(-)a/t/db_dependent/Circulation/Returns.t (-1 / +1 lines)
Lines 30-36 use C4::Items; Link Here
30
use C4::Biblio qw( AddBiblio );
30
use C4::Biblio qw( AddBiblio );
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::Account::Lines;
32
use Koha::Account::Lines;
33
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Items;
34
use Koha::Items;
35
use Koha::Patrons;
35
use Koha::Patrons;
36
36
(-)a/t/db_dependent/Circulation/StoreLastBorrower.t (-1 / +1 lines)
Lines 22-28 use Test::More tests => 1; Link Here
22
use C4::Circulation qw( AddReturn );
22
use C4::Circulation qw( AddReturn );
23
use C4::Context;
23
use C4::Context;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Items;
26
use Koha::Items;
27
27
28
use t::lib::Mocks;
28
use t::lib::Mocks;
(-)a/t/db_dependent/Circulation/dateexpiry.t (-1 / +1 lines)
Lines 21-27 use DateTime; Link Here
21
use Time::HiRes qw/gettimeofday time/;
21
use Time::HiRes qw/gettimeofday time/;
22
use Test::More tests => 2;
22
use Test::More tests => 2;
23
use C4::Members;
23
use C4::Members;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string output_pref );
25
use Koha::Database;
25
use Koha::Database;
26
26
27
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
(-)a/t/db_dependent/Circulation/issue.t (-1 / +1 lines)
Lines 30-36 use C4::Items; Link Here
30
use C4::Reserves qw( AddReserve );
30
use C4::Reserves qw( AddReserve );
31
use Koha::Checkouts;
31
use Koha::Checkouts;
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::Holds;
34
use Koha::Holds;
35
use Koha::Items;
35
use Koha::Items;
36
use Koha::Library;
36
use Koha::Library;
(-)a/t/db_dependent/Circulation/transfers.t (-1 / +1 lines)
Lines 21-27 use C4::Circulation qw( CreateBranchTransferLimit DeleteBranchTransferLimits Get Link Here
21
use C4::Biblio qw( AddBiblio );
21
use C4::Biblio qw( AddBiblio );
22
use C4::Items qw( ModItemTransfer );
22
use C4::Items qw( ModItemTransfer );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
use DateTime::Duration;
25
use DateTime::Duration;
26
use Koha::Item::Transfers;
26
use Koha::Item::Transfers;
27
27
(-)a/t/db_dependent/Contract.t (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use C4::Context;
22
use C4::Context;
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
use Koha::Acquisition::Booksellers;
25
use Koha::Acquisition::Booksellers;
26
26
27
use DateTime::Duration;
27
use DateTime::Duration;
(-)a/t/db_dependent/DecreaseLoanHighHolds.t (-1 / +1 lines)
Lines 20-26 use DateTime; Link Here
20
20
21
use C4::Circulation qw( CalcDateDue checkHighHolds CanBookBeIssued );
21
use C4::Circulation qw( CalcDateDue checkHighHolds CanBookBeIssued );
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils qw( dt_from_string );
24
use Koha::Patrons;
24
use Koha::Patrons;
25
use Koha::Biblio;
25
use Koha::Biblio;
26
use Koha::Item;
26
use Koha::Item;
(-)a/t/db_dependent/Fines.t (-1 / +1 lines)
Lines 5-11 use Modern::Perl; Link Here
5
use C4::Context;
5
use C4::Context;
6
use C4::Overdues qw( CalcFine );
6
use C4::Overdues qw( CalcFine );
7
use Koha::Database;
7
use Koha::Database;
8
use Koha::DateUtils;
8
use Koha::DateUtils qw( dt_from_string );
9
9
10
use Test::More tests => 5;
10
use Test::More tests => 5;
11
11
(-)a/t/db_dependent/Hold.t (-1 / +1 lines)
Lines 26-32 use C4::Calendar qw( new insert_single_holiday ); Link Here
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Holds;
27
use Koha::Holds;
28
use Koha::Item;
28
use Koha::Item;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
30
use t::lib::TestBuilder;
30
use t::lib::TestBuilder;
31
31
32
use Test::More tests => 34;
32
use Test::More tests => 34;
(-)a/t/db_dependent/Holds/WaitingReserves.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use C4::Reserves qw( ModReserve ModReserveAffect );
5
use C4::Reserves qw( ModReserve ModReserveAffect );
6
use Koha::DateUtils;
6
use Koha::DateUtils qw( dt_from_string );
7
7
8
use t::lib::Mocks;
8
use t::lib::Mocks;
9
use t::lib::TestBuilder;
9
use t::lib::TestBuilder;
(-)a/t/db_dependent/HoldsQueue.t (-1 / +1 lines)
Lines 16-22 use C4::Context; Link Here
16
use C4::Members;
16
use C4::Members;
17
use C4::Circulation qw( AddIssue AddReturn );
17
use C4::Circulation qw( AddIssue AddReturn );
18
use Koha::Database;
18
use Koha::Database;
19
use Koha::DateUtils;
19
use Koha::DateUtils qw( dt_from_string );
20
use Koha::Items;
20
use Koha::Items;
21
use Koha::Holds;
21
use Koha::Holds;
22
use Koha::CirculationRules;
22
use Koha::CirculationRules;
(-)a/t/db_dependent/Holidays.t (-2 / +1 lines)
Lines 25-32 use DateTime::TimeZone; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
use C4::Context;
26
use C4::Context;
27
use Koha::Database;
27
use Koha::Database;
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
29
30
29
31
BEGIN {
30
BEGIN {
32
    use_ok('Koha::Calendar');
31
    use_ok('Koha::Calendar');
(-)a/t/db_dependent/ILSDI_Services.t (-1 / +1 lines)
Lines 29-35 use C4::Items qw( ModItemTransfer ); Link Here
29
use C4::Circulation qw( AddIssue );
29
use C4::Circulation qw( AddIssue );
30
30
31
use Koha::AuthUtils;
31
use Koha::AuthUtils;
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string );
33
33
34
BEGIN {
34
BEGIN {
35
    use_ok('C4::ILSDI::Services', qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan ));
35
    use_ok('C4::ILSDI::Services', qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan ));
(-)a/t/db_dependent/Items/AutomaticItemModificationByAge.t (-1 / +1 lines)
Lines 10-16 use DateTime::Duration; Link Here
10
use C4::Items qw( GetMarcItem ToggleNewStatus );
10
use C4::Items qw( GetMarcItem ToggleNewStatus );
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
12
use C4::Context;
12
use C4::Context;
13
use Koha::DateUtils;
13
use Koha::DateUtils qw( dt_from_string );
14
use Koha::Items;
14
use Koha::Items;
15
use t::lib::Mocks;
15
use t::lib::Mocks;
16
use t::lib::TestBuilder;
16
use t::lib::TestBuilder;
(-)a/t/db_dependent/Koha/Acquisition/Booksellers.t (-1 / +1 lines)
Lines 28-34 use C4::Serials qw( NewSubscription SearchSubscriptions ); Link Here
28
28
29
use Koha::Acquisition::Booksellers;
29
use Koha::Acquisition::Booksellers;
30
use Koha::Database;
30
use Koha::Database;
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
32
33
my $schema  = Koha::Database->schema();
33
my $schema  = Koha::Database->schema();
34
my $builder = t::lib::TestBuilder->new;
34
my $builder = t::lib::TestBuilder->new;
(-)a/t/db_dependent/Koha/AdditionalContents.t (-1 / +1 lines)
Lines 24-30 use Test::Exception; Link Here
24
24
25
use Koha::AdditionalContents;
25
use Koha::AdditionalContents;
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
28
28
29
use t::lib::TestBuilder;
29
use t::lib::TestBuilder;
30
30
(-)a/t/db_dependent/Koha/BackgroundJobs.t (-1 / +1 lines)
Lines 25-31 use JSON qw( decode_json ); Link Here
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::BackgroundJobs;
27
use Koha::BackgroundJobs;
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
29
29
30
use t::lib::TestBuilder;
30
use t::lib::TestBuilder;
31
use t::lib::Mocks;
31
use t::lib::Mocks;
(-)a/t/db_dependent/Koha/Item.t (-1 / +1 lines)
Lines 27-33 use C4::Circulation qw( AddIssue AddReturn ); Link Here
27
27
28
use Koha::Items;
28
use Koha::Items;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Old::Items;
31
use Koha::Old::Items;
32
32
33
use List::MoreUtils qw(all);
33
use List::MoreUtils qw(all);
(-)a/t/db_dependent/Koha/Item/Transfer.t (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils qw( dt_from_string );
24
24
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
(-)a/t/db_dependent/Koha/Item/Transfers.t (-1 / +1 lines)
Lines 24-30 use Test::More tests => 3; Link Here
24
use Koha::Item::Transfer;
24
use Koha::Item::Transfer;
25
use Koha::Item::Transfers;
25
use Koha::Item::Transfers;
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
28
28
29
use t::lib::TestBuilder;
29
use t::lib::TestBuilder;
30
use t::lib::Dates;
30
use t::lib::Dates;
(-)a/t/db_dependent/Koha/Patron/Categories.t (-1 / +1 lines)
Lines 23-29 use Test::More tests => 10; Link Here
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::Database;
25
use Koha::Database;
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
use Koha::Patron::Category;
27
use Koha::Patron::Category;
28
use Koha::Patron::Categories;
28
use Koha::Patron::Categories;
29
use t::lib::Dates;
29
use t::lib::Dates;
(-)a/t/db_dependent/Koha/Patrons.t (-1 / +1 lines)
Lines 42-48 use Koha::Patron::Attribute::Types; Link Here
42
use Koha::Patron::Categories;
42
use Koha::Patron::Categories;
43
use Koha::Patron::Relationship;
43
use Koha::Patron::Relationship;
44
use Koha::Database;
44
use Koha::Database;
45
use Koha::DateUtils;
45
use Koha::DateUtils qw( dt_from_string output_pref );
46
use Koha::Virtualshelves;
46
use Koha::Virtualshelves;
47
use Koha::Notice::Messages;
47
use Koha::Notice::Messages;
48
48
(-)a/t/db_dependent/Koha/Suggestions.t (-1 / +1 lines)
Lines 25-31 use Test::Exception; Link Here
25
use Koha::Suggestion;
25
use Koha::Suggestion;
26
use Koha::Suggestions;
26
use Koha::Suggestions;
27
use Koha::Database;
27
use Koha::Database;
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
29
30
use t::lib::TestBuilder;
30
use t::lib::TestBuilder;
31
31
(-)a/t/db_dependent/Letters/TemplateToolkit.t (-1 / +1 lines)
Lines 33-39 use C4::Letters qw( GetPreparedLetter ); Link Here
33
use C4::Members qw( IssueSlip );
33
use C4::Members qw( IssueSlip );
34
use C4::Biblio;
34
use C4::Biblio;
35
use Koha::Database;
35
use Koha::Database;
36
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string output_pref );
37
use Koha::ArticleRequests;
37
use Koha::ArticleRequests;
38
use Koha::Biblio;
38
use Koha::Biblio;
39
use Koha::Biblioitem;
39
use Koha::Biblioitem;
(-)a/t/db_dependent/OAI/Server.t (-1 / +1 lines)
Lines 38-44 use C4::OAI::Sets qw(AddOAISet); Link Here
38
38
39
use Koha::Biblio::Metadatas;
39
use Koha::Biblio::Metadatas;
40
use Koha::Database;
40
use Koha::Database;
41
use Koha::DateUtils;
41
use Koha::DateUtils qw( dt_from_string );
42
42
43
BEGIN {
43
BEGIN {
44
    use_ok('Koha::OAI::Server::DeletedRecord');
44
    use_ok('Koha::OAI::Server::DeletedRecord');
(-)a/t/db_dependent/Passwordrecovery.t (-1 / +1 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use C4::Context;
20
use C4::Context;
21
use C4::Letters qw( GetQueuedMessages );
21
use C4::Letters qw( GetQueuedMessages );
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils qw( dt_from_string );
24
use Koha::Patrons;
24
use Koha::Patrons;
25
25
26
use t::lib::TestBuilder;
26
use t::lib::TestBuilder;
(-)a/t/db_dependent/Patron/Borrower_PrevCheckout.t (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
use C4::Members;
4
use C4::Members;
5
use C4::Circulation qw( AddIssue AddReturn CanBookBeIssued );
5
use C4::Circulation qw( AddIssue AddReturn CanBookBeIssued );
6
use Koha::Database;
6
use Koha::Database;
7
use Koha::DateUtils;
7
use Koha::DateUtils qw( dt_from_string );
8
use Koha::Patrons;
8
use Koha::Patrons;
9
9
10
use Test::More tests => 61;
10
use Test::More tests => 61;
(-)a/t/db_dependent/Patrons.t (-1 / +1 lines)
Lines 22-28 use Test::Warn; Link Here
22
22
23
use C4::Context;
23
use C4::Context;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
26
26
27
use t::lib::Dates;
27
use t::lib::Dates;
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
(-)a/t/db_dependent/Reserves.t (-1 / +1 lines)
Lines 34-40 use C4::Members; Link Here
34
use C4::Reserves qw( AddReserve CheckReserves GetReservesControlBranch ModReserve ModReserveAffect ReserveSlip CalculatePriority CanReserveBeCanceledFromOpac CanBookBeReserved IsAvailableForItemLevelRequest MoveReserve ChargeReserveFee RevertWaitingStatus CanItemBeReserved MergeHolds );
34
use C4::Reserves qw( AddReserve CheckReserves GetReservesControlBranch ModReserve ModReserveAffect ReserveSlip CalculatePriority CanReserveBeCanceledFromOpac CanBookBeReserved IsAvailableForItemLevelRequest MoveReserve ChargeReserveFee RevertWaitingStatus CanItemBeReserved MergeHolds );
35
use Koha::ActionLogs;
35
use Koha::ActionLogs;
36
use Koha::Caches;
36
use Koha::Caches;
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::Holds;
38
use Koha::Holds;
39
use Koha::Items;
39
use Koha::Items;
40
use Koha::Libraries;
40
use Koha::Libraries;
(-)a/t/db_dependent/Reserves/AutoUnsuspendReserves.t (-1 / +1 lines)
Lines 24-30 use t::lib::TestBuilder; Link Here
24
24
25
use C4::Reserves qw( AutoUnsuspendReserves );
25
use C4::Reserves qw( AutoUnsuspendReserves );
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::Holds;
28
use Koha::Holds;
29
29
30
my $schema = Koha::Database->new->schema;
30
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Reserves/CancelExpiredReserves.t (-1 / +1 lines)
Lines 9-15 use t::lib::TestBuilder; Link Here
9
use C4::Members;
9
use C4::Members;
10
use C4::Reserves qw( CancelExpiredReserves );
10
use C4::Reserves qw( CancelExpiredReserves );
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::DateUtils;
12
use Koha::DateUtils qw( dt_from_string );
13
use Koha::Holds;
13
use Koha::Holds;
14
14
15
my $schema = Koha::Database->new->schema;
15
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/SIP/Message.t (-1 / +1 lines)
Lines 34-40 use C4::Reserves qw( AddReserve ); Link Here
34
use C4::Circulation qw( AddReturn );
34
use C4::Circulation qw( AddReturn );
35
use Koha::Database;
35
use Koha::Database;
36
use Koha::AuthUtils qw(hash_password);
36
use Koha::AuthUtils qw(hash_password);
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::Items;
38
use Koha::Items;
39
use Koha::Checkouts;
39
use Koha::Checkouts;
40
use Koha::Old::Checkouts;
40
use Koha::Old::Checkouts;
(-)a/t/db_dependent/SIP/Patron.t (-1 / +1 lines)
Lines 12-18 use t::lib::TestBuilder; Link Here
12
use C4::SIP::ILS::Patron;
12
use C4::SIP::ILS::Patron;
13
use Koha::Account::Lines;
13
use Koha::Account::Lines;
14
use Koha::Database;
14
use Koha::Database;
15
use Koha::DateUtils;
15
use Koha::DateUtils qw( dt_from_string output_pref );
16
use Koha::Patron::Attributes;
16
use Koha::Patron::Attributes;
17
use Koha::Patrons;
17
use Koha::Patrons;
18
18
(-)a/t/db_dependent/Search/History.t (-1 / +1 lines)
Lines 17-23 use URI::Escape; Link Here
17
use List::Util qw( shuffle );
17
use List::Util qw( shuffle );
18
18
19
use C4::Context;
19
use C4::Context;
20
use Koha::DateUtils;
20
use Koha::DateUtils qw( dt_from_string output_pref );
21
21
22
my $schema = Koha::Database->new->schema;
22
my $schema = Koha::Database->new->schema;
23
$schema->storage->txn_begin;
23
$schema->storage->txn_begin;
(-)a/t/db_dependent/Serials.t (-1 / +1 lines)
Lines 12-18 use C4::Biblio qw( AddBiblio GetMarcFromKohaField ); Link Here
12
use C4::Budgets qw( AddBudgetPeriod AddBudget );
12
use C4::Budgets qw( AddBudgetPeriod AddBudget );
13
use C4::Items qw( AddItemFromMarc );
13
use C4::Items qw( AddItemFromMarc );
14
use Koha::Database;
14
use Koha::Database;
15
use Koha::DateUtils;
15
use Koha::DateUtils qw( dt_from_string output_pref );
16
use Koha::Acquisition::Booksellers;
16
use Koha::Acquisition::Booksellers;
17
use t::lib::Mocks;
17
use t::lib::Mocks;
18
use t::lib::TestBuilder;
18
use t::lib::TestBuilder;
(-)a/t/db_dependent/Sitemapper.t (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use File::Basename;
21
use File::Basename;
22
use File::Path;
22
use File::Path;
23
use DateTime;
23
use DateTime;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
use Test::MockModule;
25
use Test::MockModule;
26
use Test::More tests => 16;
26
use Test::More tests => 16;
27
use Carp qw/croak carp/;
27
use Carp qw/croak carp/;
(-)a/t/db_dependent/StockRotationItems.t (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use DateTime;
22
use DateTime;
23
use DateTime::Duration;
23
use DateTime::Duration;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Item::Transfer;
26
use Koha::Item::Transfer;
27
27
28
use Test::Warn;
28
use Test::Warn;
(-)a/t/db_dependent/Template/Plugin/KohaDates.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use C4::Context;
5
use C4::Context;
6
use Koha::DateUtils;
6
use Koha::DateUtils qw( dt_from_string output_pref );
7
7
8
use Test::MockModule;
8
use Test::MockModule;
9
use Test::More tests => 9;
9
use Test::More tests => 9;
(-)a/t/db_dependent/Upload.t (-2 / +1 lines)
Lines 12-19 use t::lib::TestBuilder; Link Here
12
12
13
use C4::Context;
13
use C4::Context;
14
use Koha::Database;
14
use Koha::Database;
15
use Koha::DateUtils;
15
use Koha::DateUtils qw( dt_from_string );
16
use Koha::UploadedFile;
17
use Koha::UploadedFiles;
16
use Koha::UploadedFiles;
18
use Koha::Uploader;
17
use Koha::Uploader;
19
18
(-)a/t/db_dependent/Virtualshelves.t (-1 / +1 lines)
Lines 6-12 use DateTime::Duration; Link Here
6
6
7
use C4::Context;
7
use C4::Context;
8
use Koha::Database;
8
use Koha::Database;
9
use Koha::DateUtils;
9
use Koha::DateUtils qw( dt_from_string );
10
use Koha::Virtualshelves;
10
use Koha::Virtualshelves;
11
use Koha::Virtualshelfshares;
11
use Koha::Virtualshelfshares;
12
use Koha::Virtualshelfcontents;
12
use Koha::Virtualshelfcontents;
(-)a/t/db_dependent/api/v1/checkouts.t (-1 / +1 lines)
Lines 29-35 use C4::Context; Link Here
29
use C4::Circulation qw( AddIssue AddReturn );
29
use C4::Circulation qw( AddIssue AddReturn );
30
30
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string output_pref );
33
33
34
my $schema = Koha::Database->schema;
34
my $schema = Koha::Database->schema;
35
my $builder = t::lib::TestBuilder->new;
35
my $builder = t::lib::TestBuilder->new;
(-)a/t/db_dependent/api/v1/holds.t (-1 / +1 lines)
Lines 32-38 use C4::Reserves qw( AddReserve CanItemBeReserved CanBookBeReserved ); Link Here
32
use C4::Items;
32
use C4::Items;
33
33
34
use Koha::Database;
34
use Koha::Database;
35
use Koha::DateUtils;
35
use Koha::DateUtils qw( dt_from_string output_pref );
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::Biblioitems;
37
use Koha::Biblioitems;
38
use Koha::Items;
38
use Koha::Items;
(-)a/t/db_dependent/cronjobs/advance_notices_digest.t (-1 / +1 lines)
Lines 25-31 use t::lib::Mocks; Link Here
25
use File::Spec;
25
use File::Spec;
26
use File::Basename;
26
use File::Basename;
27
27
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
29
29
30
my $scriptDir = dirname(File::Spec->rel2abs( __FILE__ ));
30
my $scriptDir = dirname(File::Spec->rel2abs( __FILE__ ));
31
31
(-)a/t/db_dependent/rollingloans.t (-1 / +1 lines)
Lines 5-11 use C4::Context; Link Here
5
use C4::Circulation qw( CanBookBeIssued AddIssue AddReturn );
5
use C4::Circulation qw( CanBookBeIssued AddIssue AddReturn );
6
use C4::Members;
6
use C4::Members;
7
use C4::Items;
7
use C4::Items;
8
use Koha::DateUtils;
8
use Koha::DateUtils qw( dt_from_string );
9
use Koha::Libraries;
9
use Koha::Libraries;
10
use Koha::Patrons;
10
use Koha::Patrons;
11
use t::lib::TestBuilder;
11
use t::lib::TestBuilder;
(-)a/tools/additional-contents.pl (-2 / +2 lines)
Lines 29-35 use C4::Koha; Link Here
29
use C4::Context;
29
use C4::Context;
30
use C4::Output qw(output_html_with_http_headers);
30
use C4::Output qw(output_html_with_http_headers);
31
use C4::Languages qw(getTranslatedLanguages);
31
use C4::Languages qw(getTranslatedLanguages);
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string output_pref );
33
33
use Koha::AdditionalContents;
34
use Koha::AdditionalContents;
34
35
35
my $cgi = CGI->new;
36
my $cgi = CGI->new;
36
- 

Return to bug 28931