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

(-)a/about.pl (-12 / +9 lines)
Lines 24-40 use Modern::Perl; Link Here
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use DateTime::TimeZone;
26
use DateTime::TimeZone;
27
use File::Spec;
27
use File::Slurp qw( read_file );
28
use File::Slurp;
28
use List::MoreUtils qw( any );
29
use List::MoreUtils qw/ any /;
29
use Module::Load::Conditional qw( can_load );
30
use LWP::Simple;
30
use Config qw( %Config );
31
use Module::Load::Conditional qw(can_load);
32
use XML::Simple;
33
use Config;
34
use Search::Elasticsearch;
31
use Search::Elasticsearch;
35
use Try::Tiny;
32
use Try::Tiny qw( catch try );
36
use YAML::XS;
33
use YAML::XS ();
37
use Encode;
34
use Encode ();
38
35
39
use C4::Output qw( output_html_with_http_headers );
36
use C4::Output qw( output_html_with_http_headers );
40
use C4::Auth qw( get_template_and_user get_user_subpermissions );
37
use C4::Auth qw( get_template_and_user get_user_subpermissions );
Lines 42-48 use C4::Context; Link Here
42
use C4::Installer::PerlModules;
39
use C4::Installer::PerlModules;
43
40
44
use Koha;
41
use Koha;
45
use Koha::DateUtils qw(dt_from_string output_pref);
42
use Koha::DateUtils qw( dt_from_string output_pref );
46
use Koha::Acquisition::Currencies;
43
use Koha::Acquisition::Currencies;
47
use Koha::BackgroundJob;
44
use Koha::BackgroundJob;
48
use Koha::BiblioFrameworks;
45
use Koha::BiblioFrameworks;
Lines 56-62 use Koha::SearchEngine::Elasticsearch; Link Here
56
use Koha::Logger;
53
use Koha::Logger;
57
use Koha::Filter::MARC::ViewPolicy;
54
use Koha::Filter::MARC::ViewPolicy;
58
55
59
use C4::Members::Statistics qw( get_fields );
56
use C4::Members::Statistics ();
60
57
61
58
62
#use Smart::Comments '####';
59
#use Smart::Comments '####';
(-)a/acqui/addorder.pl (-4 / +9 lines)
Lines 119-133 if it is an order from an existing suggestion : the id of this suggestion. Link Here
119
119
120
use Modern::Perl;
120
use Modern::Perl;
121
use CGI qw ( -utf8 );
121
use CGI qw ( -utf8 );
122
use JSON qw ( to_json );
122
use JSON qw( to_json );
123
use C4::Auth qw( get_template_and_user );
123
use C4::Auth qw( get_template_and_user );
124
use C4::Acquisition;    # ModOrder
124
use C4::Acquisition;    # ModOrder
125
use C4::Suggestions;    # ModStatus
125
use C4::Suggestions;    # ModStatus
126
use C4::Biblio qw( TransformHtmlToXml TransformKohaToMarc AddBiblio GetMarcFromKohaField );
126
use C4::Biblio qw(
127
    AddBiblio
128
    GetMarcFromKohaField
129
    TransformHtmlToXml
130
    TransformKohaToMarc
131
);
127
use C4::Budgets;
132
use C4::Budgets;
128
use C4::Items qw( sub AddItemFromMarc );
133
use C4::Items qw( AddItemFromMarc );
129
use C4::Output qw( output_html_with_http_headers );
134
use C4::Output qw( output_html_with_http_headers );
130
use C4::Log qw(logaction);
135
use C4::Log qw( logaction );
131
use Koha::Acquisition::Currencies;
136
use Koha::Acquisition::Currencies;
132
use Koha::Acquisition::Orders;
137
use Koha::Acquisition::Orders;
133
use Koha::Acquisition::Baskets;
138
use Koha::Acquisition::Baskets;
(-)a/acqui/addorderiso2709.pl (-7 / +11 lines)
Lines 23-32 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use Carp;
26
use YAML::XS ();
27
use YAML::XS;
27
use List::MoreUtils ();
28
use List::MoreUtils qw/uniq/;
28
use Encode ();
29
use Encode;
30
29
31
use C4::Context;
30
use C4::Context;
32
use C4::Auth qw( get_template_and_user );
31
use C4::Auth qw( get_template_and_user );
Lines 35-43 use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecor Link Here
35
use C4::Matcher;
34
use C4::Matcher;
36
use C4::Search qw( FindDuplicate );
35
use C4::Search qw( FindDuplicate );
37
use C4::Acquisition;
36
use C4::Acquisition;
38
use C4::Biblio qw( GetMarcQuantity GetMarcFromKohaField AddBiblio GetMarcPrice TransformHtmlToXml );
37
use C4::Biblio qw(
39
use C4::Items qw( PrepareItemrecordDisplay sub AddItemFromMarc );
38
    AddBiblio
40
use C4::Koha;
39
    GetMarcFromKohaField
40
    GetMarcPrice
41
    GetMarcQuantity
42
    TransformHtmlToXml
43
);
44
use C4::Items qw( AddItemFromMarc PrepareItemrecordDisplay );
41
use C4::Budgets;
45
use C4::Budgets;
42
use C4::Acquisition;
46
use C4::Acquisition;
43
use C4::Suggestions;    # GetSuggestion
47
use C4::Suggestions;    # GetSuggestion
(-)a/acqui/ajax-getauthvaluedropbox.pl (-1 / +1 lines)
Lines 48-54 Default value for the dropbox. Link Here
48
use Modern::Perl;
48
use Modern::Perl;
49
49
50
use CGI qw ( -utf8 );
50
use CGI qw ( -utf8 );
51
use C4::Charset qw( NormalizeString );
51
use C4::Charset ();
52
use C4::Auth qw( check_api_auth );
52
use C4::Auth qw( check_api_auth );
53
use Koha::AuthorisedValues;
53
use Koha::AuthorisedValues;
54
54
(-)a/acqui/basket.pl (-5 / +2 lines)
Lines 22-35 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use C4::Auth qw( get_template_and_user haspermission );
24
use C4::Auth qw( get_template_and_user haspermission );
25
use C4::Koha;
26
use C4::Output qw( output_html_with_http_headers output_and_exit );
25
use C4::Output qw( output_html_with_http_headers output_and_exit );
27
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
28
use C4::Acquisition;
27
use C4::Acquisition;
29
use C4::Budgets;
28
use C4::Budgets;
30
use C4::Contract;
29
use C4::Contract qw( GetContract );
31
use C4::Biblio;
32
use C4::Items qw( sub );
33
use C4::Suggestions;
30
use C4::Suggestions;
34
use Koha::Biblios;
31
use Koha::Biblios;
35
use Koha::Acquisition::Baskets;
32
use Koha::Acquisition::Baskets;
Lines 37-43 use Koha::Acquisition::Booksellers; Link Here
37
use Koha::Acquisition::Orders;
34
use Koha::Acquisition::Orders;
38
use Koha::Libraries;
35
use Koha::Libraries;
39
use C4::Letters qw( SendAlerts );
36
use C4::Letters qw( SendAlerts );
40
use Date::Calc qw/Add_Delta_Days/;
37
use Date::Calc qw( Add_Delta_Days );
41
use Koha::Database;
38
use Koha::Database;
42
use Koha::EDI qw( create_edi_order );
39
use Koha::EDI qw( create_edi_order );
43
use Koha::CsvProfiles;
40
use Koha::CsvProfiles;
(-)a/acqui/basketgroup.pl (-4 / +18 lines)
Lines 44-57 The bookseller who we want to display the baskets (and basketgroups) of. Link Here
44
=cut
44
=cut
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use Carp;
47
use Carp qw( croak );
48
48
49
use C4::Auth qw( get_template_and_user );
49
use C4::Auth qw( get_template_and_user );
50
use C4::Output qw( output_html_with_http_headers );
50
use C4::Output qw( output_html_with_http_headers );
51
use CGI qw ( -utf8 );
51
use CGI qw ( -utf8 );
52
use File::Spec;
52
use File::Spec ();
53
53
54
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV get_rounded_price/;
54
use C4::Acquisition qw(
55
    CloseBasketgroup
56
    DelBasketgroup
57
    get_rounded_price
58
    GetBasketgroup
59
    GetBasketGroupAsCSV
60
    GetBasketgroups
61
    GetBasketsByBasketgroup
62
    GetBasketsByBookseller
63
    GetOrders
64
    ModBasket
65
    ModBasketgroup
66
    NewBasketgroup
67
    ReOpenBasketgroup
68
);
55
use Koha::EDI qw( get_edifact_ean create_edi_order );
69
use Koha::EDI qw( get_edifact_ean create_edi_order );
56
70
57
use Koha::Biblioitems;
71
use Koha::Biblioitems;
(-)a/acqui/basketheader.pl (-1 / +1 lines)
Lines 51-57 use C4::Context; Link Here
51
use C4::Auth qw( get_template_and_user );
51
use C4::Auth qw( get_template_and_user );
52
use C4::Output qw( output_html_with_http_headers );
52
use C4::Output qw( output_html_with_http_headers );
53
use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/;
53
use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/;
54
use C4::Contract qw/GetContracts/;
54
use C4::Contract qw( GetContracts );
55
55
56
use Koha::Acquisition::Booksellers;
56
use Koha::Acquisition::Booksellers;
57
use Koha::Acquisition::Baskets;
57
use Koha::Acquisition::Baskets;
(-)a/acqui/booksellers.pl (-1 lines)
Lines 53-59 The id of the supplier whose baskets we will display Link Here
53
53
54
use Modern::Perl;
54
use Modern::Perl;
55
use C4::Auth qw( get_template_and_user );
55
use C4::Auth qw( get_template_and_user );
56
use C4::Biblio;
57
use C4::Budgets;
56
use C4::Budgets;
58
use C4::Output qw( output_html_with_http_headers );
57
use C4::Output qw( output_html_with_http_headers );
59
use CGI qw ( -utf8 );
58
use CGI qw ( -utf8 );
(-)a/acqui/cancelorder.pl (-1 / +1 lines)
Lines 31-37 and add possibility to indicate a reason for cancellation Link Here
31
31
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI;
34
use CGI ();
35
use C4::Auth qw( get_template_and_user );
35
use C4::Auth qw( get_template_and_user );
36
use C4::Output qw( output_html_with_http_headers );
36
use C4::Output qw( output_html_with_http_headers );
37
use C4::Acquisition;
37
use C4::Acquisition;
(-)a/acqui/check_uniqueness.pl (-2 / +2 lines)
Lines 32-40 Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use JSON;
35
use JSON qw( to_json );
36
use C4::Output qw( output_with_http_headers );
36
use C4::Output qw( output_with_http_headers );
37
use C4::Items qw( SearchItems );
37
use C4::Items ();
38
38
39
my $input = CGI->new;
39
my $input = CGI->new;
40
my @field = $input->multi_param('field[]');
40
my @field = $input->multi_param('field[]');
(-)a/acqui/duplicate_orders.pl (-1 / +1 lines)
Lines 28-34 use C4::Budgets qw(GetBudgetPeriods GetBudgetHierarchy CanUserUseBudget); Link Here
28
use Koha::Acquisition::Baskets;
28
use Koha::Acquisition::Baskets;
29
use Koha::Acquisition::Currencies;
29
use Koha::Acquisition::Currencies;
30
use Koha::Acquisition::Orders;
30
use Koha::Acquisition::Orders;
31
use Koha::DateUtils qw(dt_from_string output_pref);
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
32
33
my $input    = CGI->new;
33
my $input    = CGI->new;
34
my $basketno = $input->param('basketno');
34
my $basketno = $input->param('basketno');
(-)a/acqui/edi_ean.pl (-2 / +1 lines)
Lines 24-33 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Koha;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use Koha::Database;
28
use Koha::Database;
30
use CGI;
29
use CGI ();
31
my $schema = Koha::Database->new()->schema();
30
my $schema = Koha::Database->new()->schema();
32
31
33
my @eans = $schema->resultset('EdifactEan')->search(
32
my @eans = $schema->resultset('EdifactEan')->search(
(-)a/acqui/edifactmsgs.pl (-2 / +1 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI;
21
use CGI ();
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Database;
25
use Koha::Database;
27
use Koha::EDI qw( process_invoice );
26
use Koha::EDI qw( process_invoice );
(-)a/acqui/edimsg.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI;
21
use CGI ();
22
use Koha::Database;
22
use Koha::Database;
23
use C4::Koha;
23
use C4::Koha;
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/acqui/finishreceive.pl (-2 / +1 lines)
Lines 27-40 use C4::Output; Link Here
27
use C4::Context;
27
use C4::Context;
28
use C4::Acquisition;
28
use C4::Acquisition;
29
use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformHtmlToXml );
29
use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformHtmlToXml );
30
use C4::Items qw( sub GetMarcItem ModItemFromMarc AddItemFromMarc );
30
use C4::Items qw( AddItemFromMarc );
31
use C4::Search;
31
use C4::Search;
32
32
33
use Koha::Number::Price;
33
use Koha::Number::Price;
34
use Koha::Acquisition::Booksellers;
34
use Koha::Acquisition::Booksellers;
35
use Koha::Acquisition::Orders;
35
use Koha::Acquisition::Orders;
36
36
37
use List::MoreUtils qw/any/;
38
37
39
my $input=CGI->new;
38
my $input=CGI->new;
40
my $flagsrequired = {acquisition => 'order_receive'};
39
my $flagsrequired = {acquisition => 'order_receive'};
(-)a/acqui/histsearch.pl (-2 / +1 lines)
Lines 54-62 use CGI qw ( -utf8 ); Link Here
54
use C4::Auth qw( get_template_and_user );
54
use C4::Auth qw( get_template_and_user );
55
use C4::Output qw( output_html_with_http_headers );
55
use C4::Output qw( output_html_with_http_headers );
56
use C4::Acquisition;
56
use C4::Acquisition;
57
use C4::Koha;
58
use Koha::AdditionalFields;
57
use Koha::AdditionalFields;
59
use Koha::DateUtils;
58
use Koha::DateUtils qw( dt_from_string output_pref );
60
59
61
my $input = CGI->new;
60
my $input = CGI->new;
62
my $do_search               = $input->param('do_search') || 0;
61
my $do_search               = $input->param('do_search') || 0;
(-)a/acqui/invoice-files.pl (-1 / +1 lines)
Lines 29-35 Manage files associated with invoice Link Here
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI;
32
use CGI ();
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Acquisition;
35
use C4::Acquisition;
(-)a/acqui/invoice.pl (-1 / +1 lines)
Lines 36-42 use C4::Budgets; Link Here
36
36
37
use Koha::Acquisition::Booksellers;
37
use Koha::Acquisition::Booksellers;
38
use Koha::Acquisition::Currencies;
38
use Koha::Acquisition::Currencies;
39
use Koha::DateUtils;
39
use Koha::DateUtils qw( output_pref );
40
use Koha::Misc::Files;
40
use Koha::Misc::Files;
41
use Koha::Acquisition::Invoice::Adjustments;
41
use Koha::Acquisition::Invoice::Adjustments;
42
42
(-)a/acqui/invoices.pl (-1 / +1 lines)
Lines 34-40 use C4::Output qw( output_html_with_http_headers ); Link Here
34
34
35
use C4::Acquisition qw/GetInvoices/;
35
use C4::Acquisition qw/GetInvoices/;
36
use C4::Budgets;
36
use C4::Budgets;
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::Acquisition::Booksellers;
38
use Koha::Acquisition::Booksellers;
39
39
40
my $input = CGI->new;
40
my $input = CGI->new;
(-)a/acqui/lateorders-export.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use Encode;
20
use Encode ();
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Acquisition;
23
use C4::Acquisition;
(-)a/acqui/lateorders.pl (-3 / +2 lines)
Lines 46-57 To know on which branch this script have to display late order. Link Here
46
use Modern::Perl;
46
use Modern::Perl;
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use C4::Auth qw( get_template_and_user );
48
use C4::Auth qw( get_template_and_user );
49
use C4::Koha;
50
use C4::Output qw( output_html_with_http_headers );
49
use C4::Output qw( output_html_with_http_headers );
51
use C4::Context;
50
use C4::Context;
52
use C4::Acquisition;
51
use C4::Acquisition;
53
use C4::Letters qw( SendAlerts GetLetters );
52
use C4::Letters qw( GetLetters SendAlerts );
54
use Koha::DateUtils;
53
use Koha::DateUtils qw( dt_from_string output_pref );
55
use Koha::Acquisition::Orders;
54
use Koha::Acquisition::Orders;
56
use Koha::CsvProfiles;
55
use Koha::CsvProfiles;
57
56
(-)a/acqui/neworderempty.pl (-4 / +10 lines)
Lines 72-83 use C4::Auth qw( get_template_and_user ); Link Here
72
use C4::Budgets;
72
use C4::Budgets;
73
73
74
use C4::Acquisition;
74
use C4::Acquisition;
75
use C4::Contract;
75
use C4::Contract qw( GetContract );
76
use C4::Suggestions;	# GetSuggestion
76
use C4::Suggestions;	# GetSuggestion
77
use C4::Biblio qw( AddBiblio GetMarcPrice GetMarcStructure GetMarcFromKohaField GetBiblioData IsMarcStructureInternal GetMarcBiblio );
77
use C4::Biblio qw(
78
use C4::Items qw( sub );
78
    AddBiblio
79
    GetBiblioData
80
    GetMarcBiblio
81
    GetMarcFromKohaField
82
    GetMarcPrice
83
    GetMarcStructure
84
    IsMarcStructureInternal
85
);
79
use C4::Output qw( output_and_exit output_html_with_http_headers );
86
use C4::Output qw( output_and_exit output_html_with_http_headers );
80
use C4::Koha;
81
use C4::Members;
87
use C4::Members;
82
use C4::Search qw( FindDuplicate );
88
use C4::Search qw( FindDuplicate );
83
89
(-)a/acqui/newordersuggestion.pl (-1 lines)
Lines 94-100 use CGI qw ( -utf8 ); Link Here
94
use C4::Auth qw( get_template_and_user );
94
use C4::Auth qw( get_template_and_user );
95
use C4::Output qw( output_html_with_http_headers );
95
use C4::Output qw( output_html_with_http_headers );
96
use C4::Suggestions;
96
use C4::Suggestions;
97
use C4::Biblio;
98
use C4::Budgets;
97
use C4::Budgets;
99
98
100
use Koha::Acquisition::Booksellers;
99
use Koha::Acquisition::Booksellers;
(-)a/acqui/orderreceive.pl (-2 lines)
Lines 67-76 use C4::Auth qw( get_template_and_user ); Link Here
67
use C4::Output qw( output_html_with_http_headers );
67
use C4::Output qw( output_html_with_http_headers );
68
use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /;
68
use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /;
69
use C4::Members;
69
use C4::Members;
70
use C4::Items qw( sub );
71
use C4::Biblio qw( GetMarcStructure );
70
use C4::Biblio qw( GetMarcStructure );
72
use C4::Suggestions;
71
use C4::Suggestions;
73
use C4::Koha;
74
72
75
use Koha::Acquisition::Booksellers;
73
use Koha::Acquisition::Booksellers;
76
use Koha::Acquisition::Currencies;
74
use Koha::Acquisition::Currencies;
(-)a/acqui/parcel.pl (-4 lines)
Lines 59-66 use Modern::Perl; Link Here
59
use C4::Auth qw( get_template_and_user );
59
use C4::Auth qw( get_template_and_user );
60
use C4::Acquisition;
60
use C4::Acquisition;
61
use C4::Budgets;
61
use C4::Budgets;
62
use C4::Biblio;
63
use C4::Items qw( sub );
64
use CGI qw ( -utf8 );
62
use CGI qw ( -utf8 );
65
use C4::Output qw( output_html_with_http_headers );
63
use C4::Output qw( output_html_with_http_headers );
66
use C4::Suggestions;
64
use C4::Suggestions;
Lines 69-78 use Koha::Acquisition::Baskets; Link Here
69
use Koha::Acquisition::Bookseller;
67
use Koha::Acquisition::Bookseller;
70
use Koha::Acquisition::Orders;
68
use Koha::Acquisition::Orders;
71
use Koha::Biblios;
69
use Koha::Biblios;
72
use Koha::DateUtils;
73
use Koha::Biblios;
70
use Koha::Biblios;
74
71
75
use JSON;
76
72
77
my $input = CGI->new;
73
my $input = CGI->new;
78
74
(-)a/acqui/parcels.pl (-1 / +1 lines)
Lines 75-81 use C4::Acquisition; Link Here
75
use C4::Budgets;
75
use C4::Budgets;
76
76
77
use Koha::Acquisition::Booksellers;
77
use Koha::Acquisition::Booksellers;
78
use Koha::DateUtils qw( output_pref dt_from_string );
78
use Koha::DateUtils qw( dt_from_string output_pref );
79
79
80
my $input          = CGI->new;
80
my $input          = CGI->new;
81
my $booksellerid     = $input->param('booksellerid');
81
my $booksellerid     = $input->param('booksellerid');
(-)a/acqui/supplier.pl (-2 / +1 lines)
Lines 42-49 To know the bookseller this script has to display details. Link Here
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use C4::Auth qw( get_template_and_user );
44
use C4::Auth qw( get_template_and_user );
45
use C4::Contract;
45
use C4::Contract qw( GetContracts );
46
use C4::Biblio;
47
use C4::Output qw( output_html_with_http_headers );
46
use C4::Output qw( output_html_with_http_headers );
48
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
49
48
(-)a/acqui/uncertainprice.pl (-1 lines)
Lines 50-56 use C4::Output qw( output_html_with_http_headers ); Link Here
50
use CGI qw ( -utf8 );
50
use CGI qw ( -utf8 );
51
51
52
use C4::Acquisition qw/SearchOrders GetOrder ModOrder/;
52
use C4::Acquisition qw/SearchOrders GetOrder ModOrder/;
53
use C4::Biblio qw/GetBiblioData/;
54
53
55
use Koha::Acquisition::Booksellers;
54
use Koha::Acquisition::Booksellers;
56
use Koha::Acquisition::Baskets;
55
use Koha::Acquisition::Baskets;
(-)a/acqui/updatesupplier.pl (-2 lines)
Lines 47-57 contact_serialsprimary. Link Here
47
=cut
47
=cut
48
48
49
use Modern::Perl;
49
use Modern::Perl;
50
use List::Util;
51
use C4::Context;
50
use C4::Context;
52
use C4::Auth qw( checkauth );
51
use C4::Auth qw( checkauth );
53
52
54
use C4::Biblio;
55
use C4::Output;
53
use C4::Output;
56
54
57
use Koha::Acquisition::Bookseller::Contacts;
55
use Koha::Acquisition::Bookseller::Contacts;
(-)a/acqui/z3950_search.pl (-1 lines)
Lines 26-32 use C4::Auth qw( get_template_and_user ); Link Here
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Context;
28
use C4::Breeding qw( Z3950Search );
28
use C4::Breeding qw( Z3950Search );
29
use C4::Koha;
30
29
31
use Koha::Acquisition::Booksellers;
30
use Koha::Acquisition::Booksellers;
32
use Koha::BiblioFrameworks;
31
use Koha::BiblioFrameworks;
(-)a/admin/additional-fields.pl (-2 / +1 lines)
Lines 17-25 Link Here
17
# with Koha; if not, see <http://www.gnu.org/licenses>.
17
# with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI ();
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Koha;
23
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
24
use Koha::AdditionalFields;
23
use Koha::AdditionalFields;
25
24
(-)a/admin/adveditorshortcuts.pl (-2 lines)
Lines 34-46 This script allows the user to redefine the keyboard shortcuts for the advacned Link Here
34
=cut
34
=cut
35
35
36
use Modern::Perl;
36
use Modern::Perl;
37
use Encode;
38
37
39
use C4::Auth qw( get_template_and_user );
38
use C4::Auth qw( get_template_and_user );
40
use C4::Context;
39
use C4::Context;
41
use C4::Output qw( output_html_with_http_headers );
40
use C4::Output qw( output_html_with_http_headers );
42
use CGI qw ( -utf8 );
41
use CGI qw ( -utf8 );
43
use C4::Koha;
44
use Koha::KeyboardShortcuts;
42
use Koha::KeyboardShortcuts;
45
43
46
my $input            = CGI->new;
44
my $input            = CGI->new;
(-)a/admin/aqbudgetperiods.pl (-3 / +1 lines)
Lines 47-56 script to administer the budget periods table Link Here
47
use Modern::Perl;
47
use Modern::Perl;
48
48
49
use CGI qw ( -utf8 );
49
use CGI qw ( -utf8 );
50
use List::Util qw/min/;
50
use Koha::DateUtils qw( dt_from_string );
51
use Koha::DateUtils;
52
use Koha::Database;
51
use Koha::Database;
53
use C4::Koha;
54
use C4::Context;
52
use C4::Context;
55
use C4::Auth qw( get_template_and_user );
53
use C4::Auth qw( get_template_and_user );
56
use C4::Output qw( output_html_with_http_headers );
54
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/aqbudgets.pl (-2 lines)
Lines 22-28 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::Util qw/min/;
26
25
27
use Koha::Database;
26
use Koha::Database;
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
Lines 31-37 use C4::Acquisition; Link Here
31
use C4::Budgets;
30
use C4::Budgets;
32
use C4::Context;
31
use C4::Context;
33
use C4::Output qw( output_html_with_http_headers output_and_exit );
32
use C4::Output qw( output_html_with_http_headers output_and_exit );
34
use C4::Koha;
35
use Koha::Acquisition::Currencies;
33
use Koha::Acquisition::Currencies;
36
use Koha::Patrons;
34
use Koha::Patrons;
37
35
(-)a/admin/aqcontract.pl (-2 / +8 lines)
Lines 25-32 use CGI qw ( -utf8 ); Link Here
25
use C4::Context;
25
use C4::Context;
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Contract;
28
use C4::Contract qw(
29
use Koha::DateUtils;
29
    AddContract
30
    DelContract
31
    GetContract
32
    GetContracts
33
    ModContract
34
);
35
use Koha::DateUtils qw( dt_from_string output_pref );
30
36
31
use Koha::Acquisition::Booksellers;
37
use Koha::Acquisition::Booksellers;
32
38
(-)a/admin/aqplan.pl (-4 / +3 lines)
Lines 22-31 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::Util qw/min/;
25
use Date::Calc qw( Delta_YMD );
26
use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/;
26
use Date::Manip qw( DateCalc UnixDate );
27
use Date::Manip qw/ ParseDate UnixDate DateCalc/;
27
use Text::CSV_XS ();
28
use Text::CSV_XS;
29
28
30
use C4::Acquisition;
29
use C4::Acquisition;
31
use C4::Budgets;
30
use C4::Budgets;
(-)a/admin/audio_alerts.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::AudioAlert;
25
use Koha::AudioAlert;
(-)a/admin/auth_subfields_structure.pl (-1 lines)
Lines 22-28 use C4::Output qw( output_html_with_http_headers ); Link Here
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
26
25
27
use Koha::Authority::Types;
26
use Koha::Authority::Types;
28
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
(-)a/admin/auth_tag_structure.pl (-1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
26
use C4::Context;
(-)a/admin/authorised_values.pl (-2 / +2 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use List::MoreUtils qw(any);
23
use List::MoreUtils qw( any );
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Koha qw( getImageSets getitemtypeimagelocation );
27
use C4::Koha qw( getitemtypeimagelocation );
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
(-)a/admin/background_jobs.pl (-2 lines)
Lines 17-24 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use JSON qw( decode_json );
21
use Try::Tiny;
22
20
23
use C4::Context;
21
use C4::Context;
24
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
(-)a/admin/branch_transfer_limits.pl (-1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
use C4::Circulation qw( DeleteBranchTransferLimits CreateBranchTransferLimit IsBranchTransferAllowed );
27
use C4::Circulation qw( DeleteBranchTransferLimits CreateBranchTransferLimit IsBranchTransferAllowed );
29
28
30
my $input = CGI->new;
29
my $input = CGI->new;
(-)a/admin/branches.pl (-2 / +1 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Context;
27
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Koha;
30
29
31
use Koha::Database;
30
use Koha::Database;
32
use Koha::Patrons;
31
use Koha::Patrons;
(-)a/admin/cash_registers.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use CGI;
23
use CGI ();
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use Koha::Libraries;
27
use Koha::Libraries;
(-)a/admin/categories.pl (-1 / +1 lines)
Lines 27-33 use C4::Output qw( output_html_with_http_headers ); Link Here
27
use C4::Form::MessagingPreferences;
27
use C4::Form::MessagingPreferences;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
32
use Koha::Libraries;
32
use Koha::Libraries;
33
33
(-)a/admin/checkmarc.pl (-1 lines)
Lines 23-29 use C4::Output qw( output_html_with_http_headers ); Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Biblio;
27
26
28
27
29
my $input = CGI->new;
28
my $input = CGI->new;
(-)a/admin/classsources.pl (-1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
use C4::ClassSortRoutine qw( GetSortRoutineNames );
27
use C4::ClassSortRoutine qw( GetSortRoutineNames );
29
use C4::ClassSplitRoutine qw( GetSplitRoutineNames );
28
use C4::ClassSplitRoutine qw( GetSplitRoutineNames );
30
use Koha::ClassSources;
29
use Koha::ClassSources;
(-)a/admin/clone-rules.pl (-1 lines)
Lines 30-36 use CGI qw ( -utf8 ); Link Here
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Auth qw( get_template_and_user );
32
use C4::Auth qw( get_template_and_user );
33
use C4::Koha;
34
use Koha::CirculationRules;
33
use Koha::CirculationRules;
35
34
36
my $input = CGI->new;
35
my $input = CGI->new;
(-)a/admin/columns_settings.pl (-1 / +1 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI;
4
use CGI ();
5
use C4::Auth qw( get_template_and_user );
5
use C4::Auth qw( get_template_and_user );
6
use C4::Context;
6
use C4::Context;
7
use C4::Output qw( output_html_with_http_headers );
7
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/credit_types.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/admin/debit_types.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/admin/didyoumean.pl (-2 / +2 lines)
Lines 6-13 use C4::Context; Link Here
6
use C4::Auth qw( get_template_and_user );
6
use C4::Auth qw( get_template_and_user );
7
use C4::Output qw( output_html_with_http_headers );
7
use C4::Output qw( output_html_with_http_headers );
8
use Koha::SuggestionEngine;
8
use Koha::SuggestionEngine;
9
use Module::Load::Conditional qw(can_load);
9
use Module::Load::Conditional qw( can_load );
10
use JSON;
10
use JSON qw( from_json );
11
11
12
my $input = CGI->new;
12
my $input = CGI->new;
13
13
(-)a/admin/edi_accounts.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Database;
24
use Koha::Database;
(-)a/admin/edi_ean_accounts.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Database;
24
use Koha::Database;
(-)a/admin/import_export_framework.pl (-1 / +1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
use CGI::Cookie;
23
use CGI::Cookie;
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use C4::ImportExportFramework qw( ExportFramework createODS ImportFramework );
26
use C4::ImportExportFramework qw( createODS ExportFramework ImportFramework );
27
27
28
my %cookies = CGI::Cookie->fetch();
28
my %cookies = CGI::Cookie->fetch();
29
my $authenticated = 0;
29
my $authenticated = 0;
(-)a/admin/item_circulation_alerts.pl (-3 / +1 lines)
Lines 18-26 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use File::Basename;
21
use JSON qw( encode_json );
22
use Encode;
23
use JSON;
24
#use Data::Dump 'pp';
22
#use Data::Dump 'pp';
25
23
26
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/admin/items_search_field.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI ();
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/items_search_fields.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI ();
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/itemtypes.pl (-1 lines)
Lines 25-31 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
27
28
use File::Spec;
29
28
30
use C4::Koha qw( getImageSets GetAuthorisedValues );
29
use C4::Koha qw( getImageSets GetAuthorisedValues );
31
use C4::Context;
30
use C4::Context;
(-)a/admin/koha2marclinks.pl (-1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
27
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
28
use Koha::BiblioFrameworks;
27
use Koha::BiblioFrameworks;
29
use Koha::Caches;
28
use Koha::Caches;
(-)a/admin/marctagstructure.pl (-1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
26
use C4::Context;
(-)a/admin/matching-rules.pl (-1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
use C4::Matcher qw/valid_normalization_routines/;
27
use C4::Matcher qw/valid_normalization_routines/;
29
28
30
my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
29
my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
(-)a/admin/oai_set_mappings.pl (-2 / +1 lines)
Lines 35-43 use Modern::Perl; Link Here
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use C4::Auth qw( get_template_and_user );
36
use C4::Auth qw( get_template_and_user );
37
use C4::Output qw( output_html_with_http_headers );
37
use C4::Output qw( output_html_with_http_headers );
38
use C4::OAI::Sets;
38
use C4::OAI::Sets qw( GetOAISet GetOAISetMappings ModOAISetMappings );
39
39
40
use Data::Dumper;
41
40
42
my $input = CGI->new;
41
my $input = CGI->new;
43
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/admin/oai_sets.pl (-2 / +1 lines)
Lines 31-39 use Modern::Perl; Link Here
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth qw( get_template_and_user );
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::OAI::Sets;
34
use C4::OAI::Sets qw( AddOAISet DelOAISet GetOAISet GetOAISets ModOAISet );
35
35
36
use Data::Dumper;
37
36
38
my $input = CGI->new;
37
my $input = CGI->new;
39
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
38
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/admin/patron-attr-types.pl (-2 / +1 lines)
Lines 22-33 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::MoreUtils qw/uniq/;
25
use List::MoreUtils qw( uniq );
26
26
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Context;
28
use C4::Context;
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
31
use Koha::Patron::Attribute::Types;
30
use Koha::Patron::Attribute::Types;
32
31
33
use Koha::AuthorisedValues;
32
use Koha::AuthorisedValues;
(-)a/admin/preferences.pl (-7 / +5 lines)
Lines 24-39 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha qw( getallthemes );
25
use C4::Koha qw( getallthemes );
26
use C4::Languages qw( getTranslatedLanguages );
26
use C4::Languages qw( getTranslatedLanguages );
27
use C4::ClassSource qw( GetClassSources GetClassSource );
27
use C4::ClassSource qw( GetClassSources );
28
use C4::Log;
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Templates;
29
use C4::Templates;
31
use Koha::Acquisition::Currencies;
30
use Koha::Acquisition::Currencies;
32
use File::Spec;
31
use IO::File ();
33
use IO::File;
32
use YAML::XS ();
34
use YAML::XS;
33
use Encode ();
35
use Encode;
34
use List::MoreUtils qw( any );
36
use List::MoreUtils qw(any);
37
35
38
# use Smart::Comments;
36
# use Smart::Comments;
39
#
37
#
(-)a/admin/searchengine/elasticsearch/mappings.pl (-5 / +5 lines)
Lines 16-28 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI;
19
use CGI ();
20
use Scalar::Util qw(looks_like_number);
20
use Scalar::Util qw( looks_like_number );
21
use List::Util qw( first );
21
use List::Util qw( first );
22
use C4::Koha;
22
use C4::Koha;
23
use C4::Output;
23
use C4::Output;
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Log;
25
use C4::Log ();
26
26
27
use Koha::SearchEngine::Elasticsearch;
27
use Koha::SearchEngine::Elasticsearch;
28
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
28
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
Lines 30-37 use Koha::SearchMarcMaps; Link Here
30
use Koha::SearchFields;
30
use Koha::SearchFields;
31
use Koha::Caches;
31
use Koha::Caches;
32
32
33
use Try::Tiny;
33
use Try::Tiny qw( catch try );
34
use Module::Load::Conditional qw(can_load);
34
use Module::Load::Conditional qw( can_load );
35
35
36
36
37
my $input = CGI->new;
37
my $input = CGI->new;
(-)a/admin/share_content.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use JSON;
21
use JSON qw( to_json );
22
use HTTP::Request;
22
use HTTP::Request;
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/admin/smart-rules.pl (-2 / +1 lines)
Lines 22-29 use CGI qw ( -utf8 ); Link Here
22
use C4::Context;
22
use C4::Context;
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use Koha::DateUtils qw( dt_from_string output_pref );
26
use Koha::DateUtils;
27
use Koha::Database;
26
use Koha::Database;
28
use Koha::Logger;
27
use Koha::Logger;
29
use Koha::Libraries;
28
use Koha::Libraries;
(-)a/admin/sms_providers.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/admin/smtp_servers.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Scalar::Util qw(blessed);
23
use Scalar::Util qw( blessed );
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/sru_modmapping.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
24
(-)a/admin/systempreferences.pl (-3 / +3 lines)
Lines 43-56 ALSO : Link Here
43
use Modern::Perl;
43
use Modern::Perl;
44
44
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MIME::Base64;
46
use MIME::Base64 qw( encode_base64 );
47
use C4::Auth qw( get_template_and_user );
47
use C4::Auth qw( get_template_and_user );
48
use C4::Context;
48
use C4::Context;
49
use C4::Koha qw( getallthemes );
49
use C4::Koha qw( getallthemes );
50
use C4::Languages qw( getTranslatedLanguages );
50
use C4::Languages qw( getTranslatedLanguages );
51
use C4::ClassSource qw( GetClassSources GetClassSource );
51
use C4::ClassSource qw( GetClassSources );
52
use C4::Output qw( output_html_with_http_headers );
52
use C4::Output qw( output_html_with_http_headers );
53
use YAML::XS;
53
use YAML::XS ();
54
54
55
my %tabsysprefs; #we do no longer need to keep track of a tab per pref (yaml)
55
my %tabsysprefs; #we do no longer need to keep track of a tab per pref (yaml)
56
56
(-)a/admin/transfer_limits.pl (-1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Koha;
27
use C4::Circulation
26
use C4::Circulation
28
  qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
27
  qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
29
28
(-)a/admin/transport-cost-matrix.pl (-2 lines)
Lines 22-33 use CGI qw ( -utf8 ); Link Here
22
use C4::Context;
22
use C4::Context;
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
26
use C4::HoldsQueue qw( TransportCostMatrix UpdateTransportCostMatrix );
25
use C4::HoldsQueue qw( TransportCostMatrix UpdateTransportCostMatrix );
27
26
28
use Koha::Libraries;
27
use Koha::Libraries;
29
28
30
use Data::Dumper;
31
29
32
my $input = CGI->new;
30
my $input = CGI->new;
33
31
(-)a/admin/usage_statistics.pl (-1 / +1 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
23
use Koha::DateUtils qw( dt_from_string output_pref );
23
use Koha::DateUtils qw( output_pref );
24
use Koha::Libraries;
24
use Koha::Libraries;
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
(-)a/api/v1/app.pl (-1 / +1 lines)
Lines 17-21 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
require Mojolicious::Commands;
20
use Mojolicious::Commands ();
21
Mojolicious::Commands->start_app('Koha::REST::V1');
21
Mojolicious::Commands->start_app('Koha::REST::V1');
(-)a/authorities/auth_finder.pl (-1 lines)
Lines 25-31 use C4::Output qw( output_html_with_http_headers ); Link Here
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Acquisition;
27
use C4::Acquisition;
28
use C4::Koha;
29
use Koha::SearchEngine::Search;
28
use Koha::SearchEngine::Search;
30
use Koha::SearchEngine::QueryBuilder;
29
use Koha::SearchEngine::QueryBuilder;
31
30
(-)a/authorities/authorities-home.pl (-2 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use URI::Escape;
23
use URI::Escape qw( uri_escape_utf8 );
24
use POSIX qw( ceil );
24
use POSIX qw( ceil );
25
25
26
use C4::Context;
26
use C4::Context;
Lines 29-35 use C4::Output qw( output_and_exit pagination_bar output_html_with_http_headers Link Here
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Acquisition;
30
use C4::Acquisition;
31
use C4::Koha;
31
use C4::Koha;
32
use C4::Biblio;
33
use C4::Search::History;
32
use C4::Search::History;
34
33
35
use Koha::Authority::Types;
34
use Koha::Authority::Types;
(-)a/authorities/authorities.pl (-2 / +1 lines)
Lines 26-33 use C4::Output qw( output_html_with_http_headers ); Link Here
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::ImportBatch qw( sub GetImportRecordMarc );
27
use C4::ImportBatch qw( sub GetImportRecordMarc );
28
use C4::Context;
28
use C4::Context;
29
use C4::Koha;
29
use Date::Calc qw( Today );
30
use Date::Calc qw(Today);
31
use MARC::File::USMARC;
30
use MARC::File::USMARC;
32
use MARC::File::XML;
31
use MARC::File::XML;
33
use C4::Biblio qw( TransformHtmlToMarc );
32
use C4::Biblio qw( TransformHtmlToMarc );
(-)a/authorities/blinddetail-biblio-search.pl (-2 lines)
Lines 43-50 use C4::Auth qw( get_template_and_user ); Link Here
43
use C4::Context;
43
use C4::Context;
44
use C4::Output qw( output_html_with_http_headers );
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
47
use C4::Koha;
48
46
49
use Koha::Authorities;
47
use Koha::Authorities;
50
use Koha::Authority::Types;
48
use Koha::Authority::Types;
(-)a/authorities/detail-biblio-search.pl (-2 lines)
Lines 43-50 use C4::Auth qw( get_template_and_user ); Link Here
43
use C4::Context;
43
use C4::Context;
44
use C4::Output qw( output_html_with_http_headers );
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
47
use C4::Koha;
48
# use C4::Biblio;
46
# use C4::Biblio;
49
# use C4::Catalogue;
47
# use C4::Catalogue;
50
48
(-)a/authorities/detail.pl (-2 / +1 lines)
Lines 43-50 use C4::Auth qw( get_template_and_user ); Link Here
43
use C4::Context;
43
use C4::Context;
44
use C4::Output qw( output_html_with_http_headers );
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
46
use C4::Koha ();
47
use C4::Koha qw( display_marc_indicators );
48
use Koha::Authorities;
47
use Koha::Authorities;
49
48
50
use Koha::Authority::Types;
49
use Koha::Authority::Types;
(-)a/authorities/merge.pl (-1 lines)
Lines 22-28 use CGI qw ( -utf8 ); Link Here
22
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
26
use C4::Biblio qw( TransformHtmlToMarc );
25
use C4::Biblio qw( TransformHtmlToMarc );
27
26
28
use Koha::Authority::MergeRequests;
27
use Koha::Authority::MergeRequests;
(-)a/authorities/merge_ajax.pl (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
7
use JSON;
7
use JSON qw( encode_json );
8
8
9
use C4::Context;
9
use C4::Context;
10
use C4::Auth qw( check_cookie_auth );
10
use C4::Auth qw( check_cookie_auth );
(-)a/authorities/ysearch.pl (-1 / +1 lines)
Lines 29-35 This script allows ajax call for dynamic authorities search Link Here
29
29
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use Modern::Perl;
31
use Modern::Perl;
32
use JSON;
32
use JSON qw( to_json );
33
33
34
use C4::Context;
34
use C4::Context;
35
use C4::Charset qw( nsb_clean );
35
use C4::Charset qw( nsb_clean );
(-)a/basket/basket.pl (-2 / +9 lines)
Lines 19-26 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Koha;
21
use C4::Koha;
22
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetMarcAuthors GetMarcSubjects GetMarcSeries GetMarcUrls );
22
use C4::Biblio qw(
23
use C4::Items qw( sub GetItemsInfo );
23
    GetBiblioData
24
    GetMarcAuthors
25
    GetMarcBiblio
26
    GetMarcSeries
27
    GetMarcSubjects
28
    GetMarcUrls
29
);
30
use C4::Items qw( GetItemsInfo );
24
use C4::Auth qw( get_template_and_user );
31
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
32
use C4::Output qw( output_html_with_http_headers );
26
33
(-)a/basket/downloadcart.pl (-3 / +2 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode qw( encode );
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio qw( GetMarcBiblio );
26
use C4::Biblio qw( GetMarcBiblio );
27
use C4::Items;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Record;
28
use C4::Record;
30
use C4::Ris;
29
use C4::Ris qw( marc2ris );
31
30
32
use Koha::CsvProfiles;
31
use Koha::CsvProfiles;
33
32
(-)a/basket/sendbasket.pl (-6 / +11 lines)
Lines 18-29 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Encode qw(encode);
21
use Encode ();
22
use Carp;
22
use Carp qw( carp );
23
use Try::Tiny;
23
use Try::Tiny qw( catch try );
24
24
25
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetMarcAuthors GetMarcSubjects );
25
use C4::Biblio qw(
26
use C4::Items qw( sub GetItemsInfo );
26
    GetBiblioData
27
    GetMarcAuthors
28
    GetMarcBiblio
29
    GetMarcSubjects
30
);
31
use C4::Items qw( GetItemsInfo );
27
use C4::Auth qw( get_template_and_user );
32
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw( output_and_exit output_html_with_http_headers );
33
use C4::Output qw( output_and_exit output_html_with_http_headers );
29
use C4::Templates ();
34
use C4::Templates ();
(-)a/catalogue/ISBDdetail.pl (-4 / +2 lines)
Lines 35-48 This script needs a biblionumber as parameter Link Here
35
35
36
use Modern::Perl;
36
use Modern::Perl;
37
37
38
use HTML::Entities;
38
use HTML::Entities ();
39
use C4::Auth qw( get_template_and_user );
39
use C4::Auth qw( get_template_and_user );
40
use C4::Context;
40
use C4::Context;
41
use C4::Output qw( output_html_with_http_headers );
41
use C4::Output qw( output_html_with_http_headers );
42
use CGI qw ( -utf8 );
42
use CGI qw ( -utf8 );
43
use C4::Koha;
43
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetISBDView GetMarcBiblio );
44
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode GetISBDView GetBiblioData );
45
use C4::Items qw( sub );
46
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
44
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
47
use C4::Search qw( z3950_search_args enabled_staff_search_views );
45
use C4::Search qw( z3950_search_args enabled_staff_search_views );
48
46
(-)a/catalogue/MARCdetail.pl (-6 / +11 lines)
Lines 45-59 the items attached to the biblio Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use HTML::Entities;
48
use HTML::Entities ();
49
49
50
use C4::Auth qw( get_template_and_user );
50
use C4::Auth qw( get_template_and_user );
51
use C4::Context;
51
use C4::Context;
52
use C4::Output qw( output_html_with_http_headers );
52
use C4::Output qw( output_html_with_http_headers );
53
use C4::Koha qw( display_marc_indicators );
53
use C4::Koha ();
54
use MARC::Record;
54
use C4::Biblio qw(
55
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio GetMarcStructure GetBiblioData GetAuthorisedValueDesc GetMarcFromKohaField );
55
    GetAuthorisedValueDesc
56
use C4::Items qw( sub );
56
    GetBiblioData
57
    GetFrameworkCode
58
    GetMarcBiblio
59
    GetMarcFromKohaField
60
    GetMarcStructure
61
);
57
use C4::Acquisition;
62
use C4::Acquisition;
58
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
63
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
59
use C4::Search qw( z3950_search_args enabled_staff_search_views );
64
use C4::Search qw( z3950_search_args enabled_staff_search_views );
Lines 61-67 use C4::Search qw( z3950_search_args enabled_staff_search_views ); Link Here
61
use Koha::Biblios;
66
use Koha::Biblios;
62
use Koha::BiblioFrameworks;
67
use Koha::BiblioFrameworks;
63
use Koha::Patrons;
68
use Koha::Patrons;
64
use Koha::DateUtils;
69
use Koha::DateUtils qw( output_pref );
65
use Koha::Virtualshelves;
70
use Koha::Virtualshelves;
66
71
67
use List::MoreUtils qw( uniq );
72
use List::MoreUtils qw( uniq );
(-)a/catalogue/detail.pl (-8 / +14 lines)
Lines 19-42 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use HTML::Entities;
22
use HTML::Entities ();
23
use Try::Tiny;
24
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
24
use C4::Context;
26
use C4::Koha qw( GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN getitemtypeimagelocation GetAuthorisedValues );
25
use C4::Koha qw(
26
    GetAuthorisedValues
27
    getitemtypeimagelocation
28
    GetNormalizedEAN
29
    GetNormalizedISBN
30
    GetNormalizedOCLCNumber
31
    GetNormalizedUPC
32
);
27
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
33
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
28
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
29
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode GetBiblioData );
35
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
30
use C4::Items qw( GetItemsInfo GetHostItemsInfo sub GetAnalyticsCount );
36
use C4::Items qw( GetAnalyticsCount GetHostItemsInfo GetItemsInfo );
31
use C4::Circulation qw( GetTransfers );
37
use C4::Circulation qw( GetTransfers );
32
use C4::Reserves;
38
use C4::Reserves;
33
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
39
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
34
use C4::XISBN qw( get_xisbns );
40
use C4::XISBN qw( get_xisbns );
35
use C4::External::Amazon;
41
use C4::External::Amazon qw( get_amazon_tld );
36
use C4::Search qw( z3950_search_args enabled_staff_search_views );
42
use C4::Search qw( z3950_search_args enabled_staff_search_views );
37
use C4::Tags qw( get_tags get_tag );
43
use C4::Tags qw( get_tags );
38
use C4::XSLT;
44
use C4::XSLT;
39
use Koha::DateUtils;
45
use Koha::DateUtils qw( format_sqldatetime );
40
use C4::HTML5Media;
46
use C4::HTML5Media;
41
use C4::CourseReserves qw( GetItemCourseReservesInfo );
47
use C4::CourseReserves qw( GetItemCourseReservesInfo );
42
use C4::Acquisition qw(GetOrdersByBiblionumber);
48
use C4::Acquisition qw(GetOrdersByBiblionumber);
(-)a/catalogue/export.pl (-1 / +1 lines)
Lines 6-12 use C4::Auth qw( get_template_and_user ); Link Here
6
use C4::Output;
6
use C4::Output;
7
use C4::Biblio qw( GetMarcBiblio GetMarcControlnumber );
7
use C4::Biblio qw( GetMarcBiblio GetMarcControlnumber );
8
use CGI qw ( -utf8 );
8
use CGI qw ( -utf8 );
9
use C4::Ris;
9
use C4::Ris qw( marc2ris );
10
10
11
11
12
12
(-)a/catalogue/getitem-ajax.pl (-3 / +1 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use JSON;
22
use JSON qw( to_json );
23
23
24
use C4::Auth qw( check_api_auth );
24
use C4::Auth qw( check_api_auth );
25
use C4::Biblio qw( GetMarcStructure );
25
use C4::Biblio qw( GetMarcStructure );
26
use C4::Items;
27
use C4::Koha;
28
use C4::Output qw( output_with_http_headers );
26
use C4::Output qw( output_with_http_headers );
29
use Koha::Libraries;
27
use Koha::Libraries;
30
28
(-)a/catalogue/imageviewer.pl (-1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
25
use C4::Items qw( GetItemsInfo );
24
use C4::Items qw( GetItemsInfo );
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Search qw( enabled_staff_search_views );
26
use C4::Search qw( enabled_staff_search_views );
(-)a/catalogue/issuehistory.pl (-1 lines)
Lines 22-28 use CGI qw ( -utf8 ); Link Here
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
use C4::Biblio;    # GetBiblio
26
use C4::Search qw( enabled_staff_search_views );
25
use C4::Search qw( enabled_staff_search_views );
27
use C4::Serials qw( CountSubscriptionFromBiblionumber );
26
use C4::Serials qw( CountSubscriptionFromBiblionumber );
28
use Koha::Checkouts;
27
use Koha::Checkouts;
(-)a/catalogue/item-export.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
(-)a/catalogue/itemsearch.pl (-3 / +2 lines)
Lines 17-30 Link Here
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI ();
21
21
22
use JSON;
22
use JSON qw( to_json );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_with_http_headers output_html_with_http_headers );
25
use C4::Output qw( output_with_http_headers output_html_with_http_headers );
26
use C4::Items qw( SearchItems );
26
use C4::Items qw( SearchItems );
27
use C4::Biblio;
28
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Koha qw( GetAuthorisedValues );
29
28
30
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
(-)a/catalogue/labeledMARCdetail.pl (-4 / +7 lines)
Lines 19-31 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 ); 
21
use CGI qw ( -utf8 ); 
22
use HTML::Entities;
22
use HTML::Entities ();
23
use MARC::Record;
24
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
24
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio GetMarcStructure GetBiblioData );
26
use C4::Biblio qw(
28
use C4::Items qw( sub );
27
    GetBiblioData
28
    GetFrameworkCode
29
    GetMarcBiblio
30
    GetMarcStructure
31
);
29
use C4::Search qw( z3950_search_args enabled_staff_search_views );
32
use C4::Search qw( z3950_search_args enabled_staff_search_views );
30
use C4::Serials qw( CountSubscriptionFromBiblionumber );
33
use C4::Serials qw( CountSubscriptionFromBiblionumber );
31
34
(-)a/catalogue/moredetail.pl (-3 / +2 lines)
Lines 22-30 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Koha qw( GetAuthorisedValues );
23
use C4::Koha qw( GetAuthorisedValues );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use HTML::Entities;
25
use HTML::Entities ();
26
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
26
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
27
use C4::Items qw( sub GetItemsInfo GetHostItemsInfo );
27
use C4::Items qw( GetHostItemsInfo GetItemsInfo );
28
use C4::Acquisition;
28
use C4::Acquisition;
29
use C4::Output qw( output_and_exit output_html_with_http_headers );
29
use C4::Output qw( output_and_exit output_html_with_http_headers );
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
Lines 34-40 use C4::Search qw( enabled_staff_search_views z3950_search_args ); Link Here
34
use Koha::Acquisition::Booksellers;
34
use Koha::Acquisition::Booksellers;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::DateUtils;
38
use Koha::Items;
37
use Koha::Items;
39
use Koha::Patrons;
38
use Koha::Patrons;
40
39
(-)a/catalogue/search.pl (-5 / +4 lines)
Lines 143-152 use C4::Context; Link Here
143
use C4::Output qw( output_html_with_http_headers pagination_bar );
143
use C4::Output qw( output_html_with_http_headers pagination_bar );
144
use C4::Auth qw( get_template_and_user );
144
use C4::Auth qw( get_template_and_user );
145
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
145
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
146
use C4::Languages qw( getlanguage getLanguages );
146
use C4::Languages qw( getLanguages );
147
use C4::Koha qw( getitemtypeimagelocation GetAuthorisedValues );
147
use C4::Koha qw( GetAuthorisedValues getitemtypeimagelocation );
148
use URI::Escape;
148
use URI::Escape qw( uri_unescape );
149
use POSIX qw(ceil floor);
150
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
149
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
151
150
152
use Koha::ItemTypes;
151
use Koha::ItemTypes;
Lines 157-163 use Koha::SearchEngine::QueryBuilder; Link Here
157
use Koha::Virtualshelves;
156
use Koha::Virtualshelves;
158
use Koha::SearchFields;
157
use Koha::SearchFields;
159
158
160
use URI::Escape;
159
use URI::Escape qw( uri_unescape );
161
160
162
my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
161
my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
163
# create a new CGI object
162
# create a new CGI object
(-)a/catalogue/showmarc.pl (-2 / +1 lines)
Lines 24-31 use Modern::Perl; Link Here
24
24
25
# standard or CPAN modules used
25
# standard or CPAN modules used
26
use CGI qw(:standard -utf8);
26
use CGI qw(:standard -utf8);
27
use DBI;
27
use Encode ();
28
use Encode;
29
28
30
# Koha modules used
29
# Koha modules used
31
use C4::Context;
30
use C4::Context;
(-)a/catalogue/stockrotation.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
=cut
25
=cut
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI ();
29
29
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
(-)a/catalogue/updateitem.pl (-2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( checkauth );
22
use C4::Auth qw( checkauth );
23
use C4::Context;
23
use C4::Context;
24
use C4::Biblio;
25
use C4::Items;
26
use C4::Output;
24
use C4::Output;
27
use C4::Circulation qw( LostItem );
25
use C4::Circulation qw( LostItem );
28
use C4::Reserves;
26
use C4::Reserves;
(-)a/cataloguing/addbiblio.pl (-9 / +18 lines)
Lines 21-51 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI q(-utf8);
24
use CGI ();
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Auth qw( get_template_and_user haspermission );
26
use C4::Auth qw( get_template_and_user haspermission );
27
use C4::Biblio qw( GetMarcFromKohaField GetFrameworkCode GetMarcStructure GetUsedMarcStructure GetMarcBiblio PrepHostMarcField prepare_host_field TransformHtmlToMarc ModBiblio AddBiblio DelBiblio );
27
use C4::Biblio qw(
28
    AddBiblio
29
    DelBiblio
30
    GetFrameworkCode
31
    GetMarcBiblio
32
    GetMarcFromKohaField
33
    GetMarcStructure
34
    GetUsedMarcStructure
35
    ModBiblio
36
    prepare_host_field
37
    PrepHostMarcField
38
    TransformHtmlToMarc
39
);
28
use C4::Search qw( FindDuplicate enabled_staff_search_views );
40
use C4::Search qw( FindDuplicate enabled_staff_search_views );
29
use C4::Auth qw( get_template_and_user haspermission );
41
use C4::Auth qw( get_template_and_user haspermission );
30
use C4::Context;
42
use C4::Context;
31
use MARC::Record;
43
use MARC::Record ();
32
use C4::Log;
44
use C4::ClassSource qw( GetClassSources );
33
use C4::Koha;
34
use C4::ClassSource qw( GetClassSources GetClassSource );
35
use C4::ImportBatch qw( sub GetImportRecordMarc );
45
use C4::ImportBatch qw( sub GetImportRecordMarc );
36
use C4::Charset qw( SetMarcUnicodeFlag );
46
use C4::Charset qw( SetMarcUnicodeFlag );
37
use Koha::BiblioFrameworks;
47
use Koha::BiblioFrameworks;
38
use Koha::DateUtils;
48
use Koha::DateUtils qw( dt_from_string );
39
49
40
use Koha::ItemTypes;
50
use Koha::ItemTypes;
41
use Koha::Libraries;
51
use Koha::Libraries;
42
52
43
use Koha::BiblioFrameworks;
53
use Koha::BiblioFrameworks;
44
54
45
use Date::Calc qw(Today);
46
use MARC::File::USMARC;
55
use MARC::File::USMARC;
47
use MARC::File::XML;
56
use MARC::File::XML;
48
use URI::Escape;
57
use URI::Escape qw( uri_escape_utf8 );
49
58
50
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
59
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
51
    MARC::File::XML->default_record_format('UNIMARC');
60
    MARC::File::XML->default_record_format('UNIMARC');
(-)a/cataloguing/addbooks.pl (-3 / +1 lines)
Lines 27-39 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
28
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use URI::Escape;
31
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
32
use C4::Biblio;
33
use C4::Breeding qw( BreedingSearch );
31
use C4::Breeding qw( BreedingSearch );
34
use C4::Output qw( output_html_with_http_headers pagination_bar );
32
use C4::Output qw( output_html_with_http_headers pagination_bar );
35
use C4::Koha qw( getnbpages );
33
use C4::Koha qw( getnbpages );
36
use C4::Languages qw( getlanguage );
34
use C4::Languages ();
37
use C4::Search qw( searchResults z3950_search_args );
35
use C4::Search qw( searchResults z3950_search_args );
38
36
39
use Koha::BiblioFrameworks;
37
use Koha::BiblioFrameworks;
(-)a/cataloguing/additem.pl (-9 / +19 lines)
Lines 24-50 use Modern::Perl; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( get_template_and_user haspermission );
25
use C4::Auth qw( get_template_and_user haspermission );
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Biblio qw( GetMarcFromKohaField GetFrameworkCode GetMarcStructure GetMarcBiblio TransformMarcToKoha TransformHtmlToXml ModBiblio EmbedItemsInMarcBiblio GetAuthorisedValueDesc IsMarcStructureInternal );
27
use C4::Biblio qw(
28
use C4::Items qw( sub AddItemFromMarc GetMarcItem ModItemFromMarc );
28
    GetAuthorisedValueDesc
29
    GetFrameworkCode
30
    GetMarcBiblio
31
    GetMarcFromKohaField
32
    GetMarcStructure
33
    IsMarcStructureInternal
34
    ModBiblio
35
    TransformHtmlToXml
36
    TransformMarcToKoha
37
);
38
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
29
use C4::Context;
39
use C4::Context;
30
use C4::Circulation qw( LostItem );
40
use C4::Circulation qw( LostItem );
31
use C4::Koha qw( GetAuthorisedValues );
41
use C4::Koha qw( GetAuthorisedValues );
32
use C4::ClassSource qw( GetClassSources GetClassSource );
42
use C4::ClassSource qw( GetClassSources );
33
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Items;
44
use Koha::Items;
35
use Koha::ItemTypes;
45
use Koha::ItemTypes;
36
use Koha::Libraries;
46
use Koha::Libraries;
37
use Koha::Patrons;
47
use Koha::Patrons;
38
use Koha::SearchEngine::Indexer;
48
use Koha::SearchEngine::Indexer;
39
use List::MoreUtils qw/any/;
49
use List::MoreUtils qw( any );
40
use C4::Search qw( enabled_staff_search_views );
50
use C4::Search qw( enabled_staff_search_views );
41
use Storable qw(thaw freeze);
51
use Storable qw( freeze thaw );
42
use URI::Escape;
52
use URI::Escape qw( uri_escape_utf8 );
43
use C4::Members;
53
use C4::Members;
44
54
45
use MARC::File::XML;
55
use MARC::File::XML;
46
use URI::Escape;
56
use URI::Escape qw( uri_escape_utf8 );
47
use MIME::Base64 qw(decode_base64url encode_base64url);
57
use MIME::Base64 qw( decode_base64url encode_base64url );
48
58
49
our $dbh = C4::Context->dbh;
59
our $dbh = C4::Context->dbh;
50
60
(-)a/cataloguing/editor.pl (-3 / +1 lines)
Lines 20-30 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI;
23
use CGI ();
24
use MARC::Record;
25
24
26
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
27
use C4::Biblio;
28
use C4::Context;
26
use C4::Context;
29
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
30
use DBIx::Class::ResultClass::HashRefInflator;
28
use DBIx::Class::ResultClass::HashRefInflator;
(-)a/cataloguing/linkitem.pl (-3 / +1 lines)
Lines 24-33 use Modern::Perl; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio qw( GetMarcBiblio PrepHostMarcField ModBiblio );
27
use C4::Biblio qw( GetMarcBiblio ModBiblio PrepHostMarcField );
28
use C4::Items qw( sub );
29
use C4::Context;
28
use C4::Context;
30
use C4::Koha;
31
29
32
30
33
my $query = CGI->new;
31
my $query = CGI->new;
(-)a/cataloguing/merge.pl (-3 / +11 lines)
Lines 23-32 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Items qw( sub MoveItemFromBiblio );
26
use C4::Items qw( MoveItemFromBiblio );
27
use C4::Biblio qw( TransformHtmlToMarc GetMarcBiblio ModBiblio DelBiblio GetFrameworkCode GetMarcStructure GetMarcFromKohaField GetBiblioData );
27
use C4::Biblio qw(
28
    DelBiblio
29
    GetBiblioData
30
    GetFrameworkCode
31
    GetMarcBiblio
32
    GetMarcFromKohaField
33
    GetMarcStructure
34
    ModBiblio
35
    TransformHtmlToMarc
36
);
28
use C4::Serials qw( CountSubscriptionFromBiblionumber );
37
use C4::Serials qw( CountSubscriptionFromBiblionumber );
29
use C4::Koha;
30
use C4::Reserves qw( MergeHolds );
38
use C4::Reserves qw( MergeHolds );
31
use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/;
39
use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/;
32
40
(-)a/cataloguing/merge_ajax.pl (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
7
use JSON;
7
use JSON qw( encode_json );
8
8
9
use C4::Context;
9
use C4::Context;
10
use C4::Biblio qw( GetMarcStructure );
10
use C4::Biblio qw( GetMarcStructure );
(-)a/cataloguing/moveitem.pl (-4 lines)
Lines 24-39 use Modern::Perl; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio;
28
use C4::Items qw( MoveItemFromBiblio );
27
use C4::Items qw( MoveItemFromBiblio );
29
use C4::Context;
28
use C4::Context;
30
use C4::Koha;
31
use C4::ClassSource;
32
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
29
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
33
30
34
use Koha::Biblios;
31
use Koha::Biblios;
35
32
36
use Date::Calc qw(Today);
37
33
38
use MARC::File::XML;
34
use MARC::File::XML;
39
35
(-)a/cataloguing/value_builder/barcode.pl (-2 / +2 lines)
Lines 25-33 use Modern::Perl; Link Here
25
use C4::Context;
25
use C4::Context;
26
use C4::Barcodes::ValueBuilder;
26
use C4::Barcodes::ValueBuilder;
27
use C4::Biblio qw( GetMarcFromKohaField );
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
29
30
use Algorithm::CheckDigits;
30
use Algorithm::CheckDigits qw( CheckDigits );
31
31
32
my $DEBUG = 0;
32
my $DEBUG = 0;
33
33
(-)a/cataloguing/value_builder/barcode_manual.pl (-1 / +1 lines)
Lines 25-31 use Modern::Perl; Link Here
25
use C4::Context;
25
use C4::Context;
26
use C4::Barcodes::ValueBuilder;
26
use C4::Barcodes::ValueBuilder;
27
use C4::Biblio qw( GetMarcFromKohaField );
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
29
30
my $DEBUG = 0;
30
my $DEBUG = 0;
31
31
(-)a/cataloguing/value_builder/cn_browser.pl (-1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI;
24
23
25
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
26
use C4::ClassSource qw( GetClassSort );
25
use C4::ClassSource qw( GetClassSort );
(-)a/cataloguing/value_builder/dateaccessioned.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string output_pref );
25
25
26
my $builder = sub {
26
my $builder = sub {
27
    my ( $params ) = @_;
27
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_field_006.pl (-1 / +1 lines)
Lines 27-33 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use XML::LibXML;
30
use XML::LibXML ();
31
31
32
my $builder = sub {
32
my $builder = sub {
33
    my ( $params ) = @_;
33
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_field_008.pl (-1 / +1 lines)
Lines 27-33 use C4::Context; Link Here
27
use C4::Search;
27
use C4::Search;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use XML::LibXML;
30
use XML::LibXML ();
31
use Koha::Util::FrameworkPlugin qw|date_entered|;
31
use Koha::Util::FrameworkPlugin qw|date_entered|;
32
32
33
my $builder = sub {
33
my $builder = sub {
(-)a/cataloguing/value_builder/marc21_linking_section.pl (-2 lines)
Lines 29-36 use C4::Auth qw( get_template_and_user ); Link Here
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
32
use C4::Koha;
33
use MARC::Record;
34
32
35
use Koha::ItemTypes;
33
use Koha::ItemTypes;
36
34
(-)a/cataloguing/value_builder/unimarc_field_100.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Date::Calc qw( Today );
23
use Date::Calc ();
24
24
25
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use Koha::Util::FrameworkPlugin qw(wrapper);
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
(-)a/cataloguing/value_builder/unimarc_field_210c.pl (-1 lines)
Lines 25-31 use C4::Context; Link Here
25
use C4::Output qw( pagination_bar output_html_with_http_headers );
25
use C4::Output qw( pagination_bar output_html_with_http_headers );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Search;
27
use C4::Search;
28
use MARC::Record;
29
use C4::Koha qw( getnbpages );
28
use C4::Koha qw( getnbpages );
30
29
31
###TODO To rewrite in order to use SearchAuthorities
30
###TODO To rewrite in order to use SearchAuthorities
(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-2 lines)
Lines 29-36 use C4::Auth qw( get_template_and_user ); Link Here
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
32
use C4::Koha;
33
use MARC::Record;
34
32
35
use Koha::ItemTypes;
33
use Koha::ItemTypes;
36
34
(-)a/cataloguing/ysearch.pl (-1 / +1 lines)
Lines 29-35 use CGI qw ( -utf8 ); Link Here
29
use C4::Context;
29
use C4::Context;
30
use C4::Charset qw( nsb_clean );
30
use C4::Charset qw( nsb_clean );
31
use C4::Auth qw( check_cookie_auth );
31
use C4::Auth qw( check_cookie_auth );
32
use JSON qw/ to_json /;
32
use JSON qw( to_json );
33
33
34
my $input = CGI->new;
34
my $input = CGI->new;
35
my $query = $input->param('term');
35
my $query = $input->param('term');
(-)a/cataloguing/z3950_auth_search.pl (-1 lines)
Lines 24-30 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Breeding qw( Z3950Search Z3950SearchAuth );
26
use C4::Breeding qw( Z3950Search Z3950SearchAuth );
27
use C4::Koha;
28
27
29
my $input        = CGI->new;
28
my $input        = CGI->new;
30
my $dbh          = C4::Context->dbh;
29
my $dbh          = C4::Context->dbh;
(-)a/cataloguing/z3950_search.pl (-1 lines)
Lines 25-31 use C4::Auth qw( get_template_and_user ); Link Here
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use C4::Breeding qw( Z3950Search );
27
use C4::Breeding qw( Z3950Search );
28
use C4::Koha;
29
28
30
my $input        = CGI->new;
29
my $input        = CGI->new;
31
my $error         = $input->param('error');
30
my $error         = $input->param('error');
(-)a/circ/article-request-slip.pl (-1 / +1 lines)
Lines 24-30 use CGI qw( -utf8 ); Link Here
24
use C4::Context;
24
use C4::Context;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Letters qw( GetPreparedLetter );
27
use C4::Letters ();
28
use Koha::ArticleRequests;
28
use Koha::ArticleRequests;
29
use Koha::Patrons;
29
use Koha::Patrons;
30
30
(-)a/circ/bookcount.pl (-2 lines)
Lines 25-34 use CGI qw ( -utf8 ); Link Here
25
use C4::Context;
25
use C4::Context;
26
use C4::Circulation;
26
use C4::Circulation;
27
use C4::Output qw( output_and_exit output_html_with_http_headers );
27
use C4::Output qw( output_and_exit output_html_with_http_headers );
28
use C4::Koha;
29
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
30
use Koha::Biblios;
29
use Koha::Biblios;
31
use Koha::DateUtils;
32
use Koha::Libraries;
30
use Koha::Libraries;
33
31
34
my $input        = CGI->new;
32
my $input        = CGI->new;
(-)a/circ/branchoverdues.pl (-2 / +2 lines)
Lines 24-32 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Overdues qw( GetOverduesForBranch );
24
use C4::Overdues qw( GetOverduesForBranch );
25
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure );
25
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure );
26
use C4::Koha qw( GetAuthorisedValues );
26
use C4::Koha qw( GetAuthorisedValues );
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::BiblioFrameworks;
28
use Koha::BiblioFrameworks;
29
use Data::Dumper;
29
use Data::Dumper qw( Dumper );
30
30
31
=head1 branchoverdues.pl
31
=head1 branchoverdues.pl
32
32
(-)a/circ/branchtransfers.pl (-3 lines)
Lines 25-34 use CGI qw ( -utf8 ); Link Here
25
use C4::Circulation qw( transferbook );
25
use C4::Circulation qw( transferbook );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Reserves qw( ModReserve ModReserveAffect );
27
use C4::Reserves qw( ModReserve ModReserveAffect );
28
use C4::Biblio;
29
use C4::Items;
30
use C4::Auth qw( get_session get_template_and_user );
28
use C4::Auth qw( get_session get_template_and_user );
31
use C4::Koha;
32
use C4::Members;
29
use C4::Members;
33
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
34
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
(-)a/circ/circulation.pl (-10 / +4 lines)
Lines 30-43 use DateTime; Link Here
30
use DateTime::Duration;
30
use DateTime::Duration;
31
use Scalar::Util qw( looks_like_number );
31
use Scalar::Util qw( looks_like_number );
32
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
32
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
33
use C4::Auth qw( get_session get_template_and_user haspermission );
33
use C4::Auth qw( get_session get_template_and_user );
34
use C4::Koha;
34
use C4::Koha;
35
use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue );
35
use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue );
36
use C4::Utils::DataTables::Members;
36
use C4::Utils::DataTables::Members;
37
use C4::Members;
37
use C4::Members;
38
use C4::Biblio qw( TransformMarcToKoha );
38
use C4::Biblio qw( TransformMarcToKoha );
39
use C4::Search qw( new_record_from_zebra );
39
use C4::Search qw( new_record_from_zebra );
40
use MARC::Record;
41
use C4::Reserves;
40
use C4::Reserves;
42
use Koha::Holds;
41
use Koha::Holds;
43
use C4::Context;
42
use C4::Context;
Lines 45-52 use CGI::Session; Link Here
45
use Koha::AuthorisedValues;
44
use Koha::AuthorisedValues;
46
use Koha::CsvProfiles;
45
use Koha::CsvProfiles;
47
use Koha::Patrons;
46
use Koha::Patrons;
48
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::Patron::Debarments qw( GetDebarments );
49
use Koha::DateUtils;
48
use Koha::DateUtils qw( dt_from_string output_pref );
50
use Koha::Database;
49
use Koha::Database;
51
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
52
use Koha::Items;
51
use Koha::Items;
Lines 55-66 use Koha::SearchEngine; Link Here
55
use Koha::SearchEngine::Search;
54
use Koha::SearchEngine::Search;
56
use Koha::Patron::Modifications;
55
use Koha::Patron::Modifications;
57
56
58
use Date::Calc qw(
57
use List::MoreUtils qw( uniq );
59
  Today
60
  Add_Delta_Days
61
  Date_to_Days
62
);
63
use List::MoreUtils qw/uniq/;
64
58
65
#
59
#
66
# PARAMETERS READING
60
# PARAMETERS READING
(-)a/circ/on-site_checkouts.pl (-1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Circulation qw( GetPendingOnSiteCheckouts );
22
use C4::Circulation qw( GetPendingOnSiteCheckouts );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Koha;
25
use Koha::BiblioFrameworks;
24
use Koha::BiblioFrameworks;
26
25
27
my $cgi = CGI->new;
26
my $cgi = CGI->new;
(-)a/circ/overdue.pl (-2 / +2 lines)
Lines 24-31 use C4::Context; Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use CGI qw(-oldstyle_urls -utf8);
25
use CGI qw(-oldstyle_urls -utf8);
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use Text::CSV_XS;
27
use Text::CSV_XS ();
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
use DateTime;
29
use DateTime;
30
use DateTime::Format::MySQL;
30
use DateTime::Format::MySQL;
31
31
(-)a/circ/pendingreserves.pl (-4 / +4 lines)
Lines 21-37 use Modern::Perl; Link Here
21
21
22
use constant PULL_INTERVAL => 2;
22
use constant PULL_INTERVAL => 2;
23
use List::MoreUtils qw( uniq );
23
use List::MoreUtils qw( uniq );
24
use YAML::XS;
24
use YAML::XS ();
25
use Encode;
25
use Encode ();
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
31
use C4::Items qw( ModItemTransfer );
31
use C4::Items ();
32
use C4::Reserves qw( ModReserveCancelAll );
32
use C4::Reserves qw( ModReserveCancelAll );
33
use Koha::Biblios;
33
use Koha::Biblios;
34
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string );
35
use Koha::Holds;
35
use Koha::Holds;
36
use DateTime::Duration;
36
use DateTime::Duration;
37
37
(-)a/circ/renew.pl (-2 / +1 lines)
Lines 24-31 use C4::Context; Link Here
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Circulation qw( barcodedecode CanBookBeRenewed GetSoonestRenewDate GetLatestAutoRenewDate AddRenewal );
26
use C4::Circulation qw( barcodedecode CanBookBeRenewed GetSoonestRenewDate GetLatestAutoRenewDate AddRenewal );
27
use C4::Koha;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::DateUtils;
29
use Koha::Database;
28
use Koha::Database;
30
use Koha::BiblioFrameworks;
29
use Koha::BiblioFrameworks;
31
30
(-)a/circ/reserveratios.pl (-2 / +1 lines)
Lines 21-34 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Date::Calc qw/Today Add_Delta_YM/;
25
use POSIX qw( ceil );
24
use POSIX qw( ceil );
26
25
27
use C4::Context;
26
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
30
use C4::Acquisition qw/GetOrdersByBiblionumber/;
29
use C4::Acquisition qw/GetOrdersByBiblionumber/;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Acquisition::Baskets;
31
use Koha::Acquisition::Baskets;
33
32
34
my $input = CGI->new;
33
my $input = CGI->new;
(-)a/circ/returns.pl (-4 / +2 lines)
Lines 38-48 use C4::Auth qw( get_template_and_user get_session haspermission ); Link Here
38
use C4::Output qw( output_html_with_http_headers );
38
use C4::Output qw( output_html_with_http_headers );
39
use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem );
39
use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem );
40
use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
40
use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
41
use C4::Biblio;
42
use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem );
41
use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem );
43
use C4::Context;
42
use C4::Context;
44
use C4::Items qw( ModItemTransfer sub );
43
use C4::Items qw( ModItemTransfer );
45
use C4::Koha;   # FIXME : is it still useful ?
46
use C4::Members::Messaging;
44
use C4::Members::Messaging;
47
use C4::Members;
45
use C4::Members;
48
use C4::Output qw( output_html_with_http_headers );
46
use C4::Output qw( output_html_with_http_headers );
Lines 52-58 use Koha::AuthorisedValues; Link Here
52
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
53
use Koha::Calendar;
51
use Koha::Calendar;
54
use Koha::Checkouts;
52
use Koha::Checkouts;
55
use Koha::DateUtils;
53
use Koha::DateUtils qw( dt_from_string output_pref );
56
use Koha::Holds;
54
use Koha::Holds;
57
use Koha::Items;
55
use Koha::Items;
58
use Koha::Item::Transfers;
56
use Koha::Item::Transfers;
(-)a/circ/set-library.pl (-1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user get_session );
25
use C4::Auth qw( get_template_and_user get_session );
26
use C4::Koha;
27
use Koha::BiblioFrameworks;
26
use Koha::BiblioFrameworks;
28
use Koha::Cash::Registers;
27
use Koha::Cash::Registers;
29
use Koha::Libraries;
28
use Koha::Libraries;
(-)a/circ/transfers_to_send.pl (-1 / +1 lines)
Lines 23-29 use C4::Context; Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
27
28
my $input      = CGI->new;
28
my $input      = CGI->new;
29
my $itemnumber = $input->param('itemnumber');
29
my $itemnumber = $input->param('itemnumber');
(-)a/circ/transferstoreceive.pl (-8 / +2 lines)
Lines 23-43 use CGI qw ( -utf8 ); Link Here
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
27
use C4::Circulation qw( GetTransfers GetTransfersFromTo );
26
use C4::Circulation qw( GetTransfers GetTransfersFromTo );
28
use C4::Members;
27
use C4::Members;
29
use Date::Calc qw(
28
use Date::Calc qw( Add_Delta_Days Date_to_Days Today );
30
  Today
31
  Add_Delta_Days
32
  Date_to_Days
33
);
34
29
35
use C4::Koha;
36
use C4::Reserves;
30
use C4::Reserves;
37
use Koha::Items;
31
use Koha::Items;
38
use Koha::ItemTypes;
32
use Koha::ItemTypes;
39
use Koha::Libraries;
33
use Koha::Libraries;
40
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::BiblioFrameworks;
35
use Koha::BiblioFrameworks;
42
use Koha::Patrons;
36
use Koha::Patrons;
43
37
(-)a/circ/view_holdsqueue.pl (-2 lines)
Lines 26-33 use Modern::Perl; Link Here
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Biblio;
30
use C4::Items;
31
use C4::HoldsQueue qw( GetHoldsQueueItems );
29
use C4::HoldsQueue qw( GetHoldsQueueItems );
32
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
33
use Koha::ItemTypes;
31
use Koha::ItemTypes;
(-)a/circ/waitingreserves.pl (-9 / +3 lines)
Lines 25-40 use C4::Output qw( output_html_with_http_headers ); Link Here
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Circulation;
26
use C4::Circulation;
27
use C4::Members;
27
use C4::Members;
28
use C4::Biblio;
28
use C4::Items qw( ModItemTransfer );
29
use C4::Items qw( sub ModItemTransfer );
29
use Date::Calc qw( Date_to_Days Today );
30
use Date::Calc qw(
31
  Today
32
  Add_Delta_Days
33
  Date_to_Days
34
);
35
use C4::Reserves qw( ModReserve ModReserveCancelAll );
30
use C4::Reserves qw( ModReserve ModReserveCancelAll );
36
use C4::Koha;
31
use Koha::DateUtils qw( dt_from_string output_pref );
37
use Koha::DateUtils;
38
use Koha::BiblioFrameworks;
32
use Koha::BiblioFrameworks;
39
use Koha::Items;
33
use Koha::Items;
40
use Koha::ItemTypes;
34
use Koha::ItemTypes;
(-)a/circ/ysearch.pl (-1 / +1 lines)
Lines 29-35 use CGI qw ( -utf8 ); Link Here
29
use C4::Context;
29
use C4::Context;
30
use C4::Auth qw( check_cookie_auth );
30
use C4::Auth qw( check_cookie_auth );
31
use Koha::Patrons;
31
use Koha::Patrons;
32
use Koha::DateUtils qw/format_sqldatetime/;
32
use Koha::DateUtils qw( format_sqldatetime );
33
33
34
use JSON qw( to_json );
34
use JSON qw( to_json );
35
35
(-)a/clubs/club-enrollments.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/clubs/clubs-add-modify.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils qw(dt_from_string);
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::Clubs;
28
use Koha::Clubs;
29
use Koha::Club::Fields;
29
use Koha::Club::Fields;
30
30
(-)a/clubs/clubs.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/clubs/patron-clubs-tab.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/clubs/patron-enroll.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/clubs/templates-add-modify.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::DateUtils qw(dt_from_string);
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::Club::Templates;
28
use Koha::Club::Templates;
29
use Koha::Club::Template::Fields;
29
use Koha::Club::Template::Fields;
30
use Koha::Club::Template::EnrollmentFields;
30
use Koha::Club::Template::EnrollmentFields;
(-)a/course_reserves/add_items.pl (-1 lines)
Lines 25-31 use CGI qw ( -utf8 ); Link Here
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Biblio;
29
use Koha::Items;
28
use Koha::Items;
30
29
31
use C4::CourseReserves qw( GetCourse GetCourseReserve ModCourse ModCourseItem ModCourseReserve );
30
use C4::CourseReserves qw( GetCourse GetCourseReserve ModCourse ModCourseItem ModCourseReserve );
(-)a/course_reserves/course-details.pl (-1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
27
29
use C4::CourseReserves qw( DelCourse DelCourseReserve GetCourse GetCourseReserve GetCourseReserves );
28
use C4::CourseReserves qw( DelCourse DelCourseReserve GetCourse GetCourseReserve GetCourseReserves );
30
29
(-)a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl (-1 / +1 lines)
Lines 28-34 Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use Authen::CAS::Client;
30
use Authen::CAS::Client;
31
use Storable qw(nstore_fd);
31
use Storable qw( nstore_fd );
32
32
33
my $casServerUrl = 'https://localhost:8443/cas/';
33
my $casServerUrl = 'https://localhost:8443/cas/';
34
my $cas = Authen::CAS::Client->new($casServerUrl);
34
my $cas = Authen::CAS::Client->new($casServerUrl);
(-)a/docs/CAS/CASProxy/examples/proxy_cas_data.pl (-3 / +2 lines)
Lines 33-41 This PGTIOU will allow us to retrive the matching PGTID Link Here
33
use Modern::Perl;
33
use Modern::Perl;
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use Authen::CAS::Client;
35
use Authen::CAS::Client;
36
use Storable qw(fd_retrieve);
36
use Storable qw( fd_retrieve );
37
use LWP::Simple;
37
use LWP::Simple qw( get );
38
use URI::Escape;
39
38
40
my $casServerUrl = 'https://localhost:8443/cas/';
39
my $casServerUrl = 'https://localhost:8443/cas/';
41
my $cas = Authen::CAS::Client->new($casServerUrl);
40
my $cas = Authen::CAS::Client->new($casServerUrl);
(-)a/errors/400.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/401.pl (-1 / +1 lines)
Lines 20-26 use CGI qw ( -utf8 ); Link Here
20
use C4::Auth qw( get_template_and_user );
20
use C4::Auth qw( get_template_and_user );
21
use C4::Output qw( output_with_http_headers );
21
use C4::Output qw( output_with_http_headers );
22
use C4::Context;
22
use C4::Context;
23
use List::MoreUtils qw(any);
23
use List::MoreUtils qw( any );
24
24
25
my $query = CGI->new;
25
my $query = CGI->new;
26
my $admin = C4::Context->preference('KohaAdminEmailAddress');
26
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/402.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/403.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/404.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/500.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/ill/ill-requests.pl (-4 / +4 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
Lines 31-39 use Koha::Illrequest::Availability; Link Here
31
use Koha::Libraries;
31
use Koha::Libraries;
32
use Koha::Token;
32
use Koha::Token;
33
33
34
use Try::Tiny;
34
use Try::Tiny qw( catch try );
35
use URI::Escape;
35
use URI::Escape qw( uri_escape_utf8 );
36
use JSON;
36
use JSON qw( encode_json );
37
37
38
our $cgi = CGI->new;
38
our $cgi = CGI->new;
39
my $illRequests = Koha::Illrequests->new;
39
my $illRequests = Koha::Illrequests->new;
(-)a/installer/data/mysql/backfill_statistics.pl (-4 / +1 lines)
Lines 6-18 Link Here
6
use Modern::Perl;
6
use Modern::Perl;
7
7
8
# CPAN modules
8
# CPAN modules
9
use DBI;
10
use Getopt::Long;
11
9
12
# Koha modules
10
# Koha modules
13
use C4::Context;
11
use C4::Context;
14
use C4::Items;
12
use Data::Dumper qw( Dumper );
15
use Data::Dumper;
16
13
17
my $dbh = C4::Context->dbh;
14
my $dbh = C4::Context->dbh;
18
15
(-)a/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl (-3 / +3 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Overdues qw/CalcFine/;
24
use C4::Overdues qw/CalcFine/;
25
use C4::Log qw/logaction/;
25
use C4::Log qw( logaction );
26
26
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
30
31
my ($help, $verbose, $confirm, $log, $stdout_log);
31
my ($help, $verbose, $confirm, $log, $stdout_log);
32
32
(-)a/installer/data/mysql/update22to30.pl (-3 / +1 lines)
Lines 14-25 Link Here
14
use strict;
14
use strict;
15
15
16
# CPAN modules
16
# CPAN modules
17
use DBI;
17
use Getopt::Long qw( GetOptions );
18
use Getopt::Long;
19
# Koha modules
18
# Koha modules
20
use C4::Context;
19
use C4::Context;
21
20
22
use MARC::Record;
23
use MARC::File::XML ( BinaryEncoding => 'utf8' );
21
use MARC::File::XML ( BinaryEncoding => 'utf8' );
24
 
22
 
25
# FIXME - The user might be installing a new database, so can't rely
23
# FIXME - The user might be installing a new database, so can't rely
(-)a/installer/data/mysql/updatedatabase.pl (-8 / +11 lines)
Lines 32-51 use Modern::Perl; Link Here
32
use feature 'say';
32
use feature 'say';
33
33
34
# CPAN modules
34
# CPAN modules
35
use DBI;
35
use Getopt::Long qw( GetOptions );
36
use Getopt::Long;
37
# Koha modules
36
# Koha modules
38
use C4::Context;
37
use C4::Context;
39
use C4::Installer;
38
use C4::Installer qw(
39
    column_exists
40
    foreign_key_exists
41
    index_exists
42
    TableExists
43
);
40
use Koha::Database;
44
use Koha::Database;
41
use Koha;
45
use Koha;
42
use Koha::DateUtils;
46
use Koha::DateUtils qw( dt_from_string output_pref );
43
47
44
use MARC::Record;
45
use MARC::File::XML ( BinaryEncoding => 'utf8' );
48
use MARC::File::XML ( BinaryEncoding => 'utf8' );
46
49
47
use File::Path qw[remove_tree]; # perl core module
50
use File::Path qw( remove_tree ); # perl core module
48
use File::Slurp;
51
use File::Slurp qw( read_file );
49
52
50
# FIXME - The user might be installing a new database, so can't rely
53
# FIXME - The user might be installing a new database, so can't rely
51
# on /etc/koha.conf anyway.
54
# on /etc/koha.conf anyway.
Lines 6079-6085 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6079
    push @gstrates, split ('\|', $gist_syspref);
6082
    push @gstrates, split ('\|', $gist_syspref);
6080
    # we want to compare integer (or float)
6083
    # we want to compare integer (or float)
6081
    $_ = $_ + 0 for @gstrates;
6084
    $_ = $_ + 0 for @gstrates;
6082
    use List::MoreUtils qw/uniq/;
6085
    use List::MoreUtils qw( uniq );
6083
    # remove duplicate values
6086
    # remove duplicate values
6084
    @gstrates = uniq sort @gstrates;
6087
    @gstrates = uniq sort @gstrates;
6085
    my $new_syspref_value = join '|', @gstrates;
6088
    my $new_syspref_value = join '|', @gstrates;
(-)a/installer/html-template-to-template-toolkit.pl (-5 / +3 lines)
Lines 1-12 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Carp;
4
use Carp qw( croak );
5
use Data::Dumper;
6
5
7
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
8
use File::Basename;
7
use File::Copy qw( copy );
9
use File::Copy;
10
8
11
my $help_msg = <<EOH;
9
my $help_msg = <<EOH;
12
This script does a first-cut conversion of koha HTML::Template template files (.tmpl).
10
This script does a first-cut conversion of koha HTML::Template template files (.tmpl).
(-)a/installer/install.pl (-2 / +2 lines)
Lines 22-34 use diagnostics; Link Here
22
22
23
use C4::InstallAuth qw( get_template_and_user );
23
use C4::InstallAuth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use POSIX qw(strftime);
25
use POSIX ();
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Templates;
29
use C4::Templates;
30
use C4::Languages qw( getAllLanguages getTranslatedLanguages );
30
use C4::Languages qw( getAllLanguages getTranslatedLanguages );
31
use C4::Installer;
31
use C4::Installer ();
32
use C4::Installer::PerlModules;
32
use C4::Installer::PerlModules;
33
33
34
use Koha;
34
use Koha;
(-)a/installer/onboarding.pl (-1 / +1 lines)
Lines 26-32 use C4::Members qw( checkcardnumber ); Link Here
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Libraries;
27
use Koha::Libraries;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Patrons;
30
use Koha::Patrons;
31
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
(-)a/koha_perl_deps.pl (-4 / +3 lines)
Lines 1-9 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Getopt::Long;
3
use Getopt::Long qw( GetOptions );
4
use Pod::Usage;
4
use Pod::Usage qw( pod2usage );
5
use Term::ANSIColor;
5
use Term::ANSIColor qw( color );
6
use FindBin; # we need to enforce which C4::Installer is used in case more than one is installed
7
6
8
use lib $FindBin::Bin;
7
use lib $FindBin::Bin;
9
8
(-)a/labels/label-create-csv.pl (-2 / +1 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Text::CSV_XS;
24
use Text::CSV_XS ();
25
use Data::Dumper;
26
25
27
use C4::Creators;
26
use C4::Creators;
28
use C4::Labels;
27
use C4::Labels;
(-)a/labels/label-create-pdf.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Creators;
25
use C4::Creators ();
26
use C4::Labels;
26
use C4::Labels;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/labels/label-create-xml.pl (-3 / +1 lines)
Lines 21-30 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use XML::Simple;
24
use XML::Simple ();
25
use Data::Dumper;
26
25
27
use C4::Creators;
28
use C4::Labels;
26
use C4::Labels;
29
27
30
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/labels/label-edit-batch.pl (-1 / +1 lines)
Lines 25-31 use CGI qw ( -utf8 ); Link Here
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw( get_label_summary html_table );
29
use C4::Labels;
29
use C4::Labels;
30
30
31
use Koha::Items;
31
use Koha::Items;
(-)a/labels/label-edit-layout.pl (-2 / +7 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use POSIX;
24
use POSIX qw( exit sprintf );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw(
29
    get_barcode_types
30
    get_font_types
31
    get_label_types
32
    get_text_justification_types
33
);
29
use C4::Labels;
34
use C4::Labels;
30
35
31
my $cgi = CGI->new;
36
my $cgi = CGI->new;
(-)a/labels/label-edit-profile.pl (-1 / +1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_templates get_unit_values );
28
use C4::Labels;
28
use C4::Labels;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/labels/label-edit-template.pl (-1 / +1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_profiles get_unit_values );
28
use C4::Labels;
28
use C4::Labels;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/labels/label-item-search.pl (-5 / +4 lines)
Lines 20-39 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use List::Util qw( max min );
23
use POSIX qw( ceil );
24
use POSIX qw(ceil);
25
24
26
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Context;
27
use C4::Context;
29
use C4::Search qw( new_record_from_zebra );
28
use C4::Search qw( new_record_from_zebra );
30
use C4::Biblio qw( TransformMarcToKoha );
29
use C4::Biblio qw( TransformMarcToKoha );
31
use C4::Creators::Lib qw(html_table);
30
use C4::Creators::Lib qw( html_table );
32
31
33
use Koha::Logger;
32
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::DateUtils;
35
use Koha::Items;
33
use Koha::Items;
36
use Koha::ItemTypes;
34
use Koha::ItemTypes;
35
use Koha::Logger;
37
use Koha::SearchEngine::Search;
36
use Koha::SearchEngine::Search;
38
37
39
my $query = CGI->new;
38
my $query = CGI->new;
(-)a/labels/label-manage.pl (-2 / +7 lines)
Lines 23-33 use Modern::Perl; Link Here
23
use vars qw($debug);
23
use vars qw($debug);
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use Data::Dumper;
27
26
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Creators;
29
use C4::Creators qw(
30
    get_all_layouts
31
    get_all_profiles
32
    get_all_templates
33
    get_batch_summary
34
    html_table
35
);
31
use C4::Labels;
36
use C4::Labels;
32
37
33
my $cgi = CGI->new;
38
my $cgi = CGI->new;
(-)a/labels/label-print.pl (-2 / +5 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Data::Dumper;
24
23
25
use C4::Context;
24
use C4::Context;
26
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats);
27
use C4::Creators::Lib qw(
28
    get_all_layouts
29
    get_all_templates
30
    get_output_formats
31
);
29
use C4::Labels::Batch;
32
use C4::Labels::Batch;
30
33
31
my $cgi = CGI->new;
34
my $cgi = CGI->new;
(-)a/mainpage.pl (-2 / +1 lines)
Lines 23-30 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
26
use C4::NewsChannels qw( GetNewsToDisplay ); # GetNewsToDisplay
27
use C4::NewsChannels; # GetNewsToDisplay
28
use C4::Tags qw( get_count_by_tag_status );
27
use C4::Tags qw( get_count_by_tag_status );
29
use Koha::Patron::Modifications;
28
use Koha::Patron::Modifications;
30
use Koha::Patron::Discharge;
29
use Koha::Patron::Discharge;
(-)a/members/apikeys.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
(-)a/members/boraccount.pl (-3 / +1 lines)
Lines 23-35 Link Here
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use URI::Escape;
26
use URI::Escape qw( uri_unescape );
27
27
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
29
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use C4::Members;
32
use C4::Accounts;
33
use Koha::Cash::Registers;
31
use Koha::Cash::Registers;
34
use Koha::Patrons;
32
use Koha::Patrons;
35
use Koha::Patron::Categories;
33
use Koha::Patron::Categories;
(-)a/members/cancel-charge.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI;
20
use CGI ();
21
21
22
use C4::Auth qw( checkauth );
22
use C4::Auth qw( checkauth );
23
use Koha::Token;
23
use Koha::Token;
(-)a/members/deletemem.pl (-2 / +1 lines)
Lines 25-36 use Modern::Perl; Link Here
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
27
28
use Try::Tiny;
28
use Try::Tiny qw( catch try );
29
29
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
32
use C4::Auth qw( get_template_and_user haspermission );
32
use C4::Auth qw( get_template_and_user haspermission );
33
use C4::Members;
34
use C4::Suggestions qw( SearchSuggestion );
33
use C4::Suggestions qw( SearchSuggestion );
35
use Koha::Patrons;
34
use Koha::Patrons;
36
use Koha::Token;
35
use Koha::Token;
(-)a/members/discharge.pl (-4 / +1 lines)
Lines 28-45 Allows librarian to edit and/or manage borrowers' discharges Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
use Carp;
31
use Carp qw( carp );
32
32
33
use CGI qw( -utf8 );
33
use CGI qw( -utf8 );
34
use C4::Auth qw( get_template_and_user );
34
use C4::Auth qw( get_template_and_user );
35
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
36
use C4::Members;
37
use C4::Reserves;
36
use C4::Reserves;
38
use C4::Letters;
39
use Koha::Patron::Discharge;
37
use Koha::Patron::Discharge;
40
use Koha::Patrons;
38
use Koha::Patrons;
41
39
42
use Koha::DateUtils;
43
40
44
my $input = CGI->new;
41
my $input = CGI->new;
45
42
(-)a/members/discharges.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
(-)a/members/files.pl (-1 lines)
Lines 25-31 use C4::Auth qw( get_template_and_user ); Link Here
25
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
26
use C4::Members;
26
use C4::Members;
27
27
28
use Koha::DateUtils;
29
use Koha::Patrons;
28
use Koha::Patrons;
30
use Koha::Patron::Files;
29
use Koha::Patron::Files;
31
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
(-)a/members/housebound.pl (-2 / +2 lines)
Lines 25-36 Link Here
25
=cut
25
=cut
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI ();
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
32
use DateTime;
32
use DateTime;
33
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::Patrons;
35
use Koha::Patrons;
36
use Koha::Patron::Categories;
36
use Koha::Patron::Categories;
(-)a/members/mancredit.pl (-1 lines)
Lines 29-35 use CGI qw ( -utf8 ); Link Here
29
29
30
use C4::Members;
30
use C4::Members;
31
use C4::Accounts;
31
use C4::Accounts;
32
use C4::Items;
33
32
34
use Koha::Items;
33
use Koha::Items;
35
use Koha::Patrons;
34
use Koha::Patrons;
(-)a/members/maninvoice.pl (-2 / +1 lines)
Lines 23-36 Link Here
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use Try::Tiny;
26
use Try::Tiny qw( catch try );
27
27
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
29
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use C4::Members;
31
use C4::Members;
32
use C4::Accounts;
32
use C4::Accounts;
33
use C4::Items;
34
use Koha::Token;
33
use Koha::Token;
35
34
36
use Koha::Patrons;
35
use Koha::Patrons;
(-)a/members/member-password.pl (-3 / +1 lines)
Lines 7-25 Link Here
7
use Modern::Perl;
7
use Modern::Perl;
8
8
9
use C4::Auth qw( get_template_and_user );
9
use C4::Auth qw( get_template_and_user );
10
use Koha::AuthUtils;
11
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
10
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
12
use C4::Context;
11
use C4::Context;
13
use C4::Members;
12
use C4::Members;
14
use C4::Circulation;
13
use C4::Circulation;
15
use CGI qw ( -utf8 );
14
use CGI qw ( -utf8 );
16
use Koha::AuthUtils;
17
use Koha::Token;
15
use Koha::Token;
18
16
19
use Koha::Patrons;
17
use Koha::Patrons;
20
use Koha::Patron::Categories;
18
use Koha::Patron::Categories;
21
19
22
use Try::Tiny;
20
use Try::Tiny qw( catch try );
23
21
24
my $input = CGI->new;
22
my $input = CGI->new;
25
23
(-)a/members/member.pl (-2 / +1 lines)
Lines 27-34 use Modern::Perl; Link Here
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use CGI qw( -utf8 );
29
use CGI qw( -utf8 );
30
use Koha::DateUtils;
30
use Koha::List::Patron qw( GetPatronLists );
31
use Koha::List::Patron;
32
use Koha::Patrons;
31
use Koha::Patrons;
33
32
34
my $input = CGI->new;
33
my $input = CGI->new;
(-)a/members/memberentry.pl (-5 / +3 lines)
Lines 23-29 use Modern::Perl; Link Here
23
23
24
# external modules
24
# external modules
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use List::MoreUtils qw/uniq/;
27
26
28
# internal modules
27
# internal modules
29
use C4::Auth qw( get_template_and_user haspermission );
28
use C4::Auth qw( get_template_and_user haspermission );
Lines 31-44 use C4::Context; Link Here
31
use C4::Output qw( output_and_exit output_and_exit_if_error output_html_with_http_headers );
30
use C4::Output qw( output_and_exit output_and_exit_if_error output_html_with_http_headers );
32
use C4::Members qw( checkcardnumber get_cardnumber_length );
31
use C4::Members qw( checkcardnumber get_cardnumber_length );
33
use C4::Koha qw( GetAuthorisedValues );
32
use C4::Koha qw( GetAuthorisedValues );
34
use C4::Log;
35
use C4::Letters qw( SendAlerts );
33
use C4::Letters qw( SendAlerts );
36
use C4::Form::MessagingPreferences;
34
use C4::Form::MessagingPreferences;
37
use Koha::AuthUtils qw( is_password_valid );
35
use Koha::AuthUtils ();
38
use Koha::AuthorisedValues;
36
use Koha::AuthorisedValues;
39
use Koha::Patron::Debarments;
37
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
40
use Koha::Cities;
38
use Koha::Cities;
41
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::Libraries;
40
use Koha::Libraries;
43
use Koha::Patrons;
41
use Koha::Patrons;
44
use Koha::Patron::Attribute::Types;
42
use Koha::Patron::Attribute::Types;
(-)a/members/members-home.pl (-1 / +1 lines)
Lines 25-31 use C4::Context; Link Here
25
use C4::Members;
25
use C4::Members;
26
use Koha::Patron::Modifications;
26
use Koha::Patron::Modifications;
27
use Koha::Libraries;
27
use Koha::Libraries;
28
use Koha::List::Patron;
28
use Koha::List::Patron qw( GetPatronLists );
29
use Koha::Patron::Categories;
29
use Koha::Patron::Categories;
30
30
31
my $query = CGI->new;
31
my $query = CGI->new;
(-)a/members/merge-patrons.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/members/mod_debarment.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth qw( checkauth );
24
use C4::Auth qw( checkauth );
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Patron::Debarments;
26
use Koha::Patron::Debarments qw( AddDebarment DelDebarment );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/members/moremember.pl (-3 / +2 lines)
Lines 33-43 use C4::Context; Link Here
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use C4::Form::MessagingPreferences;
35
use C4::Form::MessagingPreferences;
36
use List::MoreUtils qw/uniq/;
36
use List::MoreUtils qw( uniq );
37
use Koha::Patron::Attribute::Types;
37
use Koha::Patron::Attribute::Types;
38
use Koha::Patron::Debarments qw(GetDebarments);
38
use Koha::Patron::Debarments qw( GetDebarments );
39
use Koha::Patron::Messages;
39
use Koha::Patron::Messages;
40
use Koha::DateUtils;
41
use Koha::CsvProfiles;
40
use Koha::CsvProfiles;
42
use Koha::Patrons;
41
use Koha::Patrons;
43
use Koha::Patron::Files;
42
use Koha::Patron::Files;
(-)a/members/notices.pl (-1 / +1 lines)
Lines 24-30 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Members;
26
use C4::Members;
27
use C4::Letters qw( GetMessage ResendMessage GetQueuedMessages );
27
use C4::Letters ();
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::Patron::Categories;
29
use Koha::Patron::Categories;
30
30
(-)a/members/pay.pl (-7 / +2 lines)
Lines 28-48 Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use URI::Escape;
31
use URI::Escape qw( uri_escape_utf8 uri_unescape );
32
use C4::Context;
32
use C4::Context;
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use C4::Members;
37
use C4::Accounts;
38
use C4::Stats;
39
use C4::Koha;
40
use C4::Overdues;
41
use Koha::Patrons;
36
use Koha::Patrons;
42
use Koha::Items;
37
use Koha::Items;
43
38
44
use Koha::Patron::Categories;
39
use Koha::Patron::Categories;
45
use URI::Escape;
40
use URI::Escape qw( uri_escape_utf8 uri_unescape );
46
41
47
our $input = CGI->new;
42
our $input = CGI->new;
48
43
(-)a/members/paycollect.pl (-5 / +2 lines)
Lines 18-32 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use URI::Escape;
21
use URI::Escape qw( uri_escape uri_unescape );
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Members;
28
use C4::Accounts;
29
use C4::Koha;
30
27
31
use Koha::Cash::Registers;
28
use Koha::Cash::Registers;
32
use Koha::Patrons;
29
use Koha::Patrons;
Lines 34-40 use Koha::Patron::Categories; Link Here
34
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
35
use Koha::Account;
32
use Koha::Account;
36
use Koha::Token;
33
use Koha::Token;
37
use Koha::DateUtils;
34
use Koha::DateUtils qw( output_pref );
38
35
39
my $input = CGI->new();
36
my $input = CGI->new();
40
37
(-)a/members/print_overdues.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/members/printfeercpt.pl (-1 / +1 lines)
Lines 23-29 use Modern::Perl; Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Letters qw( GetPreparedLetter );
26
use C4::Letters ();
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
(-)a/members/printinvoice.pl (-1 / +1 lines)
Lines 23-29 use Modern::Perl; Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Letters qw( GetPreparedLetter );
26
use C4::Letters ();
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
(-)a/members/printslip.pl (-2 lines)
Lines 38-45 use C4::Context; Link Here
38
use C4::Auth qw( get_session get_template_and_user );
38
use C4::Auth qw( get_session get_template_and_user );
39
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
39
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
40
use C4::Members qw( IssueSlip );
40
use C4::Members qw( IssueSlip );
41
use C4::Koha;
42
use Koha::DateUtils;
43
41
44
#use Smart::Comments;
42
#use Smart::Comments;
45
#use Data::Dumper;
43
#use Data::Dumper;
(-)a/members/readingrec.pl (-2 / +2 lines)
Lines 27-34 use CGI qw ( -utf8 ); Link Here
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
28
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
29
use C4::Members qw( GetAllIssues );
29
use C4::Members qw( GetAllIssues );
30
use List::MoreUtils qw/any uniq/;
30
use List::MoreUtils qw( uniq );
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string );
32
32
33
use Koha::Patrons;
33
use Koha::Patrons;
34
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
(-)a/members/setstatus.pl (-1 lines)
Lines 28-34 use Modern::Perl; Link Here
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Members;
30
use C4::Members;
31
use C4::Auth qw( checkauth );
32
use Koha::Patrons;
31
use Koha::Patrons;
33
32
34
33
(-)a/members/statistics.pl (-1 / +5 lines)
Lines 28-34 use CGI qw ( -utf8 ); Link Here
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
29
use C4::Context;
30
use C4::Members;
30
use C4::Members;
31
use C4::Members::Statistics qw( get_fields GetPrecedentStateByBorrower GetTotalIssuesTodayByBorrower GetTotalIssuesReturnedTodayByBorrower );
31
use C4::Members::Statistics qw(
32
    GetPrecedentStateByBorrower
33
    GetTotalIssuesReturnedTodayByBorrower
34
    GetTotalIssuesTodayByBorrower
35
);
32
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
36
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
33
use Koha::Patrons;
37
use Koha::Patrons;
34
use Koha::Patron::Categories;
38
use Koha::Patron::Categories;
(-)a/members/summary-print.pl (-3 / +2 lines)
Lines 17-31 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI;
20
use CGI ();
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Members;
24
use C4::Members;
25
use C4::Circulation qw( GetIssuingCharges );
25
use C4::Circulation qw( GetIssuingCharges );
26
use C4::Reserves;
26
use C4::Reserves;
27
use C4::Items qw( sub );
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::DateUtils;
29
use Koha::Holds;
28
use Koha::Holds;
30
use Koha::ItemTypes;
29
use Koha::ItemTypes;
31
use Koha::Patrons;
30
use Koha::Patrons;
(-)a/misc/add_date_fields_to_marc_records.pl (-5 / +4 lines)
Lines 18-34 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
BEGIN {
20
BEGIN {
21
    use FindBin;
21
        eval { require "$FindBin::Bin/../kohalib.pl" };
22
    eval { require "$FindBin::Bin/../kohalib.pl" };
23
}
22
}
24
23
25
use Koha::Script;
24
use Koha::Script;
26
25
27
use Getopt::Long;
26
use Getopt::Long qw( GetOptions );
28
use Pod::Usage;
27
use Pod::Usage qw( pod2usage );
29
use MARC::Field;
28
use MARC::Field;
30
29
31
use C4::Biblio qw( GetMarcBiblio ModBiblio );
30
use C4::Biblio ();
32
use Koha::DateUtils qw( dt_from_string );
31
use Koha::DateUtils qw( dt_from_string );
33
32
34
my ( $verbose, $help, $confirm, $where, @fields, $unless_exists_field );
33
my ( $verbose, $help, $confirm, $where, @fields, $unless_exists_field );
(-)a/misc/admin/set_password.pl (-4 / +4 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Bytes::Random::Secure;
22
use Bytes::Random::Secure ();
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
use String::Random;
25
use String::Random ();
26
26
27
use Koha::Patrons;
27
use Koha::Patrons;
28
use Koha::Script;
28
use Koha::Script;
(-)a/misc/background_jobs_worker.pl (-2 / +2 lines)
Lines 16-23 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json );
20
use Try::Tiny;
20
use Try::Tiny qw( catch try );
21
21
22
use Koha::BackgroundJobs;
22
use Koha::BackgroundJobs;
23
23
(-)a/misc/batchCompareMARCvsFrameworks.pl (-5 / +3 lines)
Lines 7-25 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
11
}
13
12
14
# Koha modules used
13
# Koha modules used
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Context;
15
use C4::Context;
17
use MARC::File::USMARC;
16
use MARC::File::USMARC;
18
use MARC::Record;
19
use MARC::Batch;
17
use MARC::Batch;
20
18
21
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
22
use IO::File;
20
use IO::File ();
23
21
24
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
22
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
25
my $version;
23
my $version;
(-)a/misc/batchDeleteUnusedSubfields.pl (-5 / +3 lines)
Lines 6-23 use strict; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
        eval { require "$FindBin::Bin/kohalib.pl" };
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
10
}
12
11
13
# Koha modules used
12
# Koha modules used
14
use Koha::Script;
13
use Koha::Script;
15
use MARC::Record;
16
use C4::Context;
14
use C4::Context;
17
use C4::Biblio qw( GetMarcStructure );
15
use C4::Biblio qw( GetMarcStructure );
18
use Time::HiRes qw(gettimeofday);
16
use Time::HiRes qw( gettimeofday );
19
17
20
use Getopt::Long;
18
use Getopt::Long qw( GetOptions );
21
my ( $input_marc_file, $number) = ('',0);
19
my ( $input_marc_file, $number) = ('',0);
22
my ($version, $confirm,$test_parameter);
20
my ($version, $confirm,$test_parameter);
23
GetOptions(
21
GetOptions(
(-)a/misc/batchImportMARCWithBiblionumbers.pl (-6 / +4 lines)
Lines 6-13 use strict; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
        eval { require "$FindBin::Bin/kohalib.pl" };
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
10
}
12
11
13
# Koha modules used
12
# Koha modules used
Lines 15-27 BEGIN { Link Here
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio qw( GetMarcFromKohaField );
16
use C4::Biblio qw( GetMarcFromKohaField );
18
use MARC::Record;
19
use MARC::File::USMARC;
17
use MARC::File::USMARC;
20
use MARC::File::XML;
18
use MARC::File::XML;
21
use MARC::Batch;
19
use MARC::Batch;
22
use Time::HiRes qw(gettimeofday);
20
use Time::HiRes qw( gettimeofday );
23
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
24
use IO::File;
22
use IO::File ();
25
23
26
my  $input_marc_file = '';
24
my  $input_marc_file = '';
27
my ($version);
25
my ($version);
(-)a/misc/batchRebuildBiblioTables.pl (-7 / +11 lines)
Lines 8-26 use strict; Link Here
8
BEGIN {
8
BEGIN {
9
    # find Koha's Perl modules
9
    # find Koha's Perl modules
10
    # test carefully before changing this
10
    # test carefully before changing this
11
    use FindBin;
11
        eval { require "$FindBin::Bin/kohalib.pl" };
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
12
}
14
13
15
# Koha modules used
14
# Koha modules used
16
use Koha::Script;
15
use Koha::Script;
17
use MARC::Record;
16
use MARC::Record ();
18
use C4::Charset qw( StripNonXmlChars );
17
use C4::Charset ();
19
use C4::Context;
18
use C4::Context;
20
use C4::Biblio qw( GetXmlBiblio TransformMarcToKoha _koha_modify_biblio _koha_modify_biblioitem_nonmarc );
19
use C4::Biblio qw(
21
use Time::HiRes qw(gettimeofday);
20
    _koha_modify_biblio
21
    _koha_modify_biblioitem_nonmarc
22
    GetXmlBiblio
23
    TransformMarcToKoha
24
);
25
use Time::HiRes qw( gettimeofday );
22
26
23
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
24
28
25
my ($version, $confirm);
29
my ($version, $confirm);
26
GetOptions(
30
GetOptions(
(-)a/misc/batchRebuildItemsTables.pl (-6 / +6 lines)
Lines 2-17 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Getopt::Long;
5
use Getopt::Long qw( GetOptions );
6
use MARC::Field;
6
use MARC::Field;
7
use MARC::Record;
7
use MARC::Record ();
8
use Pod::Usage;
8
use Pod::Usage qw( pod2usage );
9
use Time::HiRes qw(gettimeofday);
9
use Time::HiRes qw( gettimeofday );
10
10
11
use Koha::Script;
11
use Koha::Script;
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio qw( GetMarcFromKohaField GetMarcBiblio );
13
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
14
use C4::Items qw( sub ModItemFromMarc );
14
use C4::Items qw( ModItemFromMarc );
15
15
16
=head1 NAME
16
=head1 NAME
17
17
(-)a/misc/batchRepairMissingBiblionumbers.pl (-3 / +2 lines)
Lines 7-20 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
11
}
13
12
14
# Koha modules used
13
# Koha modules used
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio qw( GetMarcBiblio _koha_marc_update_bib_ids ModBiblio ModBiblioMarc );
16
use C4::Biblio qw( _koha_marc_update_bib_ids GetMarcBiblio ModBiblioMarc );
18
17
19
18
20
my $dbh = C4::Context->dbh;
19
my $dbh = C4::Context->dbh;
(-)a/misc/batchdeletebiblios.pl (-3 / +2 lines)
Lines 1-9 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Getopt::Long;
4
use Getopt::Long qw( GetOptions );
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use IO::File;
7
6
8
use Koha::Script;
7
use Koha::Script;
9
use C4::Biblio qw( DelBiblio );
8
use C4::Biblio qw( DelBiblio );
(-)a/misc/bin/connexion_import_daemon.pl (-7 / +7 lines)
Lines 20-26 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
24
25
my ($help, $config, $daemon);
25
my ($help, $config, $daemon);
26
26
Lines 86-103 exit; Link Here
86
{
86
{
87
package ImportProxyServer;
87
package ImportProxyServer;
88
88
89
use Carp;
89
use Carp qw( croak );
90
use IO::Socket::INET;
90
use IO::Socket::INET qw( SOCK_STREAM );
91
# use IO::Socket::IP;
91
# use IO::Socket::IP;
92
use IO::Select;
92
use IO::Select;
93
use POSIX;
93
use POSIX qw( close exit fork localtime open printf sprintf );
94
use HTTP::Status qw(:constants);
94
use HTTP::Status qw(:constants);
95
use strict;
95
use strict;
96
use warnings;
96
use warnings;
97
97
98
use LWP::UserAgent;
98
use LWP::UserAgent ();
99
use XML::Simple;
99
use XML::Simple qw( XMLin );
100
use MARC::Record;
100
use MARC::Record ();
101
use MARC::File::XML;
101
use MARC::File::XML;
102
102
103
use constant CLIENT_READ_TIMEOUT     => 5;
103
use constant CLIENT_READ_TIMEOUT     => 5;
(-)a/misc/check_sysprefs.pl (-1 / +1 lines)
Lines 8-14 Link Here
8
use strict;
8
use strict;
9
use warnings;
9
use warnings;
10
10
11
use File::Find;
11
use File::Find qw( find );
12
12
13
use Koha::Script;
13
use Koha::Script;
14
use C4::Context;
14
use C4::Context;
(-)a/misc/commit_file.pl (-3 / +2 lines)
Lines 5-18 use warnings; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
        eval { require "$FindBin::Bin/kohalib.pl" };
9
    eval { require "$FindBin::Bin/kohalib.pl" };
10
}
9
}
11
10
12
use Koha::Script;
11
use Koha::Script;
13
use C4::Context;
12
use C4::Context;
14
use C4::ImportBatch qw( GetImportBatch sub BatchCommitRecords BatchRevertRecords );
13
use C4::ImportBatch qw( GetImportBatch sub BatchCommitRecords BatchRevertRecords );
15
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
16
15
17
$| = 1;
16
$| = 1;
18
17
(-)a/misc/cronjobs/advance_notices.pl (-8 / +4 lines)
Lines 38-61 the OPAC. Link Here
38
38
39
use strict;
39
use strict;
40
use warnings;
40
use warnings;
41
use Getopt::Long;
41
use Getopt::Long qw( GetOptions );
42
use Pod::Usage;
42
use Pod::Usage qw( pod2usage );
43
use Data::Dumper;
44
BEGIN {
43
BEGIN {
45
    # find Koha's Perl modules
44
    # find Koha's Perl modules
46
    # test carefully before changing this
45
    # test carefully before changing this
47
    use FindBin;
46
        eval { require "$FindBin::Bin/../kohalib.pl" };
48
    eval { require "$FindBin::Bin/../kohalib.pl" };
49
}
47
}
50
use Koha::Script -cron;
48
use Koha::Script -cron;
51
use C4::Biblio;
52
use C4::Context;
49
use C4::Context;
53
use C4::Letters qw( get_item_content EnqueueLetter GetPreparedLetter );
50
use C4::Letters qw( get_item_content EnqueueLetter GetPreparedLetter );
54
use C4::Members;
51
use C4::Members;
55
use C4::Members::Messaging;
52
use C4::Members::Messaging;
56
use C4::Overdues;
53
use C4::Overdues;
57
use Koha::DateUtils;
54
use C4::Log qw( cronlogaction );
58
use C4::Log;
59
use Koha::Items;
55
use Koha::Items;
60
use Koha::Libraries;
56
use Koha::Libraries;
61
use Koha::Patrons;
57
use Koha::Patrons;
(-)a/misc/cronjobs/archive_purchase_suggestions.pl (-2 / +2 lines)
Lines 2-9 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
9
(-)a/misc/cronjobs/automatic_checkin.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use Koha::Checkouts;
21
use Koha::Checkouts;
22
use Koha::Script -cron;
22
use Koha::Script -cron;
23
use C4::Log;
23
use C4::Log qw( cronlogaction );
24
24
25
cronlogaction();
25
cronlogaction();
26
26
(-)a/misc/cronjobs/automatic_item_modification_by_age.pl (-5 / +5 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Getopt::Long;
5
use Getopt::Long qw( GetOptions );
6
use Pod::Usage;
6
use Pod::Usage qw( pod2usage );
7
use JSON;
7
use JSON ();
8
8
9
use Koha::Script -cron;
9
use Koha::Script -cron;
10
use C4::Context;
10
use C4::Context;
11
use C4::Items qw( ToggleNewStatus sub );
11
use C4::Items ();
12
use C4::Log;
12
use C4::Log qw( cronlogaction );
13
13
14
# Getting options
14
# Getting options
15
my ( $verbose, $help, $confirm );
15
my ( $verbose, $help, $confirm );
(-)a/misc/cronjobs/automatic_renewals.pl (-4 / +4 lines)
Lines 75-88 chosen 'Digests only' on the advance messages. Link Here
75
=cut
75
=cut
76
76
77
use Modern::Perl;
77
use Modern::Perl;
78
use Pod::Usage;
78
use Pod::Usage qw( pod2usage );
79
use Getopt::Long;
79
use Getopt::Long qw( GetOptions );
80
80
81
use Koha::Script -cron;
81
use Koha::Script -cron;
82
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
82
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
83
use C4::Context;
83
use C4::Context;
84
use C4::Log;
84
use C4::Log qw( cronlogaction );
85
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
85
use C4::Letters ();
86
use Koha::Checkouts;
86
use Koha::Checkouts;
87
use Koha::Libraries;
87
use Koha::Libraries;
88
use Koha::Patrons;
88
use Koha::Patrons;
(-)a/misc/cronjobs/batch_anonymise.pl (-9 / +4 lines)
Lines 19-43 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp;
23
22
24
BEGIN {
23
BEGIN {
25
24
26
    # find Koha's Perl modules
25
    # find Koha's Perl modules
27
    # test carefully before changing this
26
    # test carefully before changing this
28
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
28
}
31
29
32
use Koha::Script -cron;
30
use Koha::Script -cron;
33
use C4::Context;
31
use C4::Context;
34
use Koha::Patrons;
32
use Koha::Patrons;
35
use Date::Calc qw(
33
use Date::Calc qw( Add_Delta_Days Today );
36
  Today
34
use Getopt::Long qw( GetOptions );
37
  Add_Delta_Days
35
use C4::Log qw( cronlogaction );
38
);
39
use Getopt::Long;
40
use C4::Log;
41
36
42
sub usage {
37
sub usage {
43
    print STDERR <<USAGE;
38
    print STDERR <<USAGE;
(-)a/misc/cronjobs/build_browser_and_cloud.pl (-6 / +4 lines)
Lines 6-25 use strict; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
        eval { require "$FindBin::Bin/../kohalib.pl" };
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
11
}
10
}
12
11
13
use Koha::Script -cron;
12
use Koha::Script -cron;
14
use C4::Koha;
13
use C4::Koha;
15
use C4::Context;
14
use C4::Context;
16
use C4::Biblio qw( GetMarcBiblio );
15
use C4::Biblio qw( GetMarcBiblio );
17
use Date::Calc;
16
use Time::HiRes qw( gettimeofday );
18
use Time::HiRes qw(gettimeofday);
19
use ZOOM;
17
use ZOOM;
20
use MARC::File::USMARC;
18
use MARC::File::USMARC;
21
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
22
use C4::Log;
20
use C4::Log qw( cronlogaction );
23
21
24
my ( $input_marc_file, $number) = ('',0);
22
my ( $input_marc_file, $number) = ('',0);
25
my ($version, $confirm,$field,$batch,$max_digits,$cloud_tag);
23
my ($version, $confirm,$field,$batch,$max_digits,$cloud_tag);
(-)a/misc/cronjobs/cart_to_shelf.pl (-4 / +3 lines)
Lines 30-46 use warnings; Link Here
30
30
31
use Koha::Script -cron;
31
use Koha::Script -cron;
32
use C4::Items qw( CartToShelf );
32
use C4::Items qw( CartToShelf );
33
use C4::Log;
33
use C4::Log qw( cronlogaction );
34
34
35
BEGIN {
35
BEGIN {
36
36
37
    # find Koha's Perl modules
37
    # find Koha's Perl modules
38
    # test carefully before changing this
38
    # test carefully before changing this
39
    use FindBin;
39
        eval { require "$FindBin::Bin/../kohalib.pl" };
40
    eval { require "$FindBin::Bin/../kohalib.pl" };
41
}
40
}
42
use C4::Context;
41
use C4::Context;
43
use Getopt::Long;
42
use Getopt::Long qw( GetOptions );
44
43
45
my $hours = 0;
44
my $hours = 0;
46
45
(-)a/misc/cronjobs/check-url-quick.pl (-4 / +4 lines)
Lines 18-32 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Pod::Usage;
21
use Pod::Usage qw( pod2usage );
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
23
24
use Koha::Script -cron;
24
use Koha::Script -cron;
25
use C4::Context;
25
use C4::Context;
26
use C4::Biblio qw( GetMarcBiblio );
26
use C4::Biblio qw( GetMarcBiblio );
27
use AnyEvent;
27
use AnyEvent;
28
use AnyEvent::HTTP;
28
use AnyEvent::HTTP qw( http_request );
29
use Encode;
29
use Encode qw( encode_utf8 );
30
30
31
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
31
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
32
my ( $host,    $host_intranet ) = ( '', '' );
32
my ( $host,    $host_intranet ) = ( '', '' );
(-)a/misc/cronjobs/cleanup_database.pl (-5 / +4 lines)
Lines 31-47 use constant DEFAULT_DEBARMENTS_PURGEDAYS => 30; Link Here
31
BEGIN {
31
BEGIN {
32
    # find Koha's Perl modules
32
    # find Koha's Perl modules
33
    # test carefully before changing this
33
    # test carefully before changing this
34
    use FindBin;
34
        eval { require "$FindBin::Bin/../kohalib.pl" };
35
    eval { require "$FindBin::Bin/../kohalib.pl" };
36
}
35
}
37
36
38
use Koha::Script -cron;
37
use Koha::Script -cron;
39
use C4::Context;
38
use C4::Context;
40
use C4::Search;
39
use C4::Search;
41
use C4::Search::History;
40
use C4::Search::History;
42
use Getopt::Long;
41
use Getopt::Long qw( GetOptions );
43
use C4::Log;
42
use C4::Log qw( cronlogaction );
44
use C4::Accounts;
43
use C4::Accounts qw( purge_zero_balance_fees );
45
use Koha::UploadedFiles;
44
use Koha::UploadedFiles;
46
use Koha::Old::Biblios;
45
use Koha::Old::Biblios;
47
use Koha::Old::Items;
46
use Koha::Old::Items;
(-)a/misc/cronjobs/cloud-kw.pl (-6 / +6 lines)
Lines 21-34 Link Here
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
use diagnostics;
23
use diagnostics;
24
use Carp;
24
use Carp qw( carp croak );
25
use YAML::XS;
25
use YAML::XS ();
26
use Pod::Usage;
26
use Pod::Usage qw( pod2usage );
27
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
28
28
29
use Koha::Script -cron;
29
use Koha::Script -cron;
30
use C4::Context;
30
use C4::Context;
31
use C4::Log;
31
use C4::Log qw( cronlogaction );
32
32
33
my $verbose     = 0;
33
my $verbose     = 0;
34
my $help        = 0;
34
my $help        = 0;
Lines 97-103 package ZebraIndex; Link Here
97
use strict;
97
use strict;
98
use warnings;
98
use warnings;
99
use diagnostics;
99
use diagnostics;
100
use Carp;
100
use Carp qw( carp croak );
101
101
102
sub new {
102
sub new {
103
    my $self = {};
103
    my $self = {};
(-)a/misc/cronjobs/create_koc_db.pl (-3 / +3 lines)
Lines 91-99 use warnings; Link Here
91
91
92
$|++;
92
$|++;
93
93
94
use DBI;
94
use DBI ();
95
use Getopt::Long;
95
use Getopt::Long qw( GetOptions );
96
use Pod::Usage;
96
use Pod::Usage qw( pod2usage );
97
97
98
use Koha::Script -cron;
98
use Koha::Script -cron;
99
use C4::Context;
99
use C4::Context;
(-)a/misc/cronjobs/delete_items.pl (-3 / +2 lines)
Lines 1-13 Link Here
1
#! /usr/bin/perl
1
#! /usr/bin/perl
2
2
3
use Getopt::Long;
3
use Getopt::Long qw( GetOptions );
4
4
5
use Koha::Script -cron;
5
use Koha::Script -cron;
6
use C4::Context;
6
use C4::Context;
7
use C4::Items qw( sub );
8
use C4::Circulation;
7
use C4::Circulation;
9
use Modern::Perl;
8
use Modern::Perl;
10
use Pod::Usage;
9
use Pod::Usage qw( pod2usage );
11
10
12
my $dbh = C4::Context->dbh();
11
my $dbh = C4::Context->dbh();
13
12
(-)a/misc/cronjobs/delete_patrons.pl (-4 / +4 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Members qw( GetBorrowersToExpunge );
9
use C4::Members qw( GetBorrowersToExpunge );
10
use Koha::DateUtils;
10
use Koha::DateUtils qw( dt_from_string );
11
use Koha::Patrons;
11
use Koha::Patrons;
12
use C4::Log;
12
use C4::Log qw( cronlogaction );
13
13
14
my ( $help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
14
my ( $help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
15
    @category_code, $branchcode, $file, $confirm );
15
    @category_code, $branchcode, $file, $confirm );
(-)a/misc/cronjobs/delete_records_via_leader.pl (-5 / +3 lines)
Lines 27-41 BEGIN { Link Here
27
27
28
    # find Koha's Perl modules
28
    # find Koha's Perl modules
29
    # test carefully before changing this
29
    # test carefully before changing this
30
    use FindBin;
30
        eval { require "$FindBin::Bin/../kohalib.pl" };
31
    eval { require "$FindBin::Bin/../kohalib.pl" };
32
}
31
}
33
32
34
use Getopt::Long;
33
use Getopt::Long qw( GetOptions );
35
use Pod::Usage;
34
use Pod::Usage qw( pod2usage );
36
use Koha::Script -cron;
35
use Koha::Script -cron;
37
use C4::Biblio qw( DelBiblio );
36
use C4::Biblio qw( DelBiblio );
38
use C4::Items;
39
use Koha::Database;
37
use Koha::Database;
40
use Koha::Biblios;
38
use Koha::Biblios;
41
use Koha::Biblio::Metadatas;
39
use Koha::Biblio::Metadatas;
(-)a/misc/cronjobs/fines.pl (-6 / +6 lines)
Lines 33-47 use 5.010; Link Here
33
use Koha::Script -cron;
33
use Koha::Script -cron;
34
use C4::Context;
34
use C4::Context;
35
use C4::Overdues qw( Getoverdues CalcFine UpdateFine );
35
use C4::Overdues qw( Getoverdues CalcFine UpdateFine );
36
use Getopt::Long;
36
use Getopt::Long qw( GetOptions );
37
use Carp;
37
use Carp qw( carp croak );
38
use File::Spec;
38
use File::Spec ();
39
use Try::Tiny;
39
use Try::Tiny qw( catch try );
40
40
41
use Koha::Calendar;
41
use Koha::Calendar;
42
use Koha::DateUtils;
42
use Koha::DateUtils qw( dt_from_string output_pref );
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use C4::Log;
44
use C4::Log qw( cronlogaction );
45
45
46
my $help;
46
my $help;
47
my $verbose;
47
my $verbose;
(-)a/misc/cronjobs/gather_print_notices.pl (-9 / +8 lines)
Lines 5-26 use Modern::Perl; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
        eval { require "$FindBin::Bin/../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
9
}
11
10
12
use CGI qw( utf8 ); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
11
use CGI (); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
13
use Koha::Script -cron;
12
use Koha::Script -cron;
14
use C4::Context;
13
use C4::Context;
15
use C4::Letters qw( GetPrintMessages _set_message_status );
14
use C4::Letters qw( GetPrintMessages _set_message_status );
16
use C4::Templates;
15
use C4::Templates;
17
use File::Spec;
16
use File::Spec ();
18
use Pod::Usage;
17
use Pod::Usage qw( pod2usage );
19
use Getopt::Long;
18
use Getopt::Long qw( GetOptions );
20
use C4::Log;
19
use C4::Log qw( cronlogaction );
21
20
22
use Koha::DateUtils;
21
use Koha::DateUtils qw( dt_from_string output_pref );
23
use Koha::Util::OpenDocument;
22
use Koha::Util::OpenDocument qw( generate_ods );
24
use MIME::Lite;
23
use MIME::Lite;
25
24
26
my (
25
my (
(-)a/misc/cronjobs/holds/auto_unsuspend_holds.pl (-3 / +2 lines)
Lines 23-37 use warnings; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
        eval { require "$FindBin::Bin/../kohalib.pl" };
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
27
}
29
28
30
# cancel all expired hold requests
29
# cancel all expired hold requests
31
30
32
use Koha::Script -cron;
31
use Koha::Script -cron;
33
use C4::Reserves;
32
use C4::Reserves;
34
use C4::Log;
33
use C4::Log qw( cronlogaction );
35
34
36
cronlogaction();
35
cronlogaction();
37
36
(-)a/misc/cronjobs/holds/build_holds_queue.pl (-3 / +2 lines)
Lines 11-23 use warnings; Link Here
11
BEGIN {
11
BEGIN {
12
    # find Koha's Perl modules
12
    # find Koha's Perl modules
13
    # test carefully before changing this
13
    # test carefully before changing this
14
    use FindBin;
14
        eval { require "$FindBin::Bin/../kohalib.pl" };
15
    eval { require "$FindBin::Bin/../kohalib.pl" };
16
}
15
}
17
16
18
use Koha::Script -cron;
17
use Koha::Script -cron;
19
use C4::HoldsQueue qw(CreateQueue);
18
use C4::HoldsQueue qw(CreateQueue);
20
use C4::Log;
19
use C4::Log qw( cronlogaction );
21
20
22
cronlogaction();
21
cronlogaction();
23
22
(-)a/misc/cronjobs/holds/cancel_expired_holds.pl (-5 / +4 lines)
Lines 39-57 This script calls C4::Reserves::CancelExpiredReserves which will find and cancel Link Here
39
=cut
39
=cut
40
40
41
use Modern::Perl;
41
use Modern::Perl;
42
use Getopt::Long;
42
use Getopt::Long qw( GetOptions );
43
use Pod::Usage;
43
use Pod::Usage qw( pod2usage );
44
44
45
BEGIN {
45
BEGIN {
46
    # find Koha's Perl modules
46
    # find Koha's Perl modules
47
    # test carefully before changing this
47
    # test carefully before changing this
48
    use FindBin;
48
        eval { require "$FindBin::Bin/../kohalib.pl" };
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
49
}
51
50
52
use Koha::Script -cron;
51
use Koha::Script -cron;
53
use C4::Reserves;
52
use C4::Reserves;
54
use C4::Log;
53
use C4::Log qw( cronlogaction );
55
54
56
=head1 OPTIONS
55
=head1 OPTIONS
57
56
(-)a/misc/cronjobs/holds/cancel_unfilled_holds.pl (-6 / +4 lines)
Lines 21-39 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
        eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
25
}
27
26
28
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
28
use Pod::Usage qw( pod2usage );
30
29
31
use Koha::Script -cron;
30
use Koha::Script -cron;
32
use C4::Reserves;
31
use C4::Reserves;
33
use C4::Log;
32
use C4::Log qw( cronlogaction );
34
use Koha::Holds;
33
use Koha::Holds;
35
use Koha::Calendar;
34
use Koha::Calendar;
36
use Koha::DateUtils;
37
use Koha::Libraries;
35
use Koha::Libraries;
38
36
39
cronlogaction();
37
cronlogaction();
(-)a/misc/cronjobs/holds/holds_reminder.pl (-8 / +6 lines)
Lines 21-40 BEGIN { Link Here
21
21
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
        eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
25
}
27
26
28
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
28
use Pod::Usage qw( pod2usage );
30
use Text::CSV_XS;
31
use DateTime;
29
use DateTime;
32
use DateTime::Duration;
30
use DateTime::Duration;
33
31
34
use C4::Context;
32
use C4::Context;
35
use C4::Letters;
33
use C4::Letters ();
36
use C4::Log;
34
use C4::Log qw( cronlogaction );
37
use Koha::DateUtils;
35
use Koha::DateUtils qw( dt_from_string );
38
use Koha::Calendar;
36
use Koha::Calendar;
39
use Koha::Libraries;
37
use Koha::Libraries;
40
use Koha::Notice::Templates;
38
use Koha::Notice::Templates;
(-)a/misc/cronjobs/import_webservice_batch.pl (-4 / +2 lines)
Lines 25-36 BEGIN { Link Here
25
25
26
    # find Koha's Perl modules
26
    # find Koha's Perl modules
27
    # test carefully before changing this
27
    # test carefully before changing this
28
    use FindBin;
28
        eval { require "$FindBin::Bin/../kohalib.pl" };
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
29
}
31
30
32
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
33
use Pod::Usage;
34
use Koha::Script -cron;
32
use Koha::Script -cron;
35
use C4::ImportBatch qw( BatchCommitRecords );
33
use C4::ImportBatch qw( BatchCommitRecords );
36
34
(-)a/misc/cronjobs/longoverdue.pl (-6 / +4 lines)
Lines 30-46 use warnings; Link Here
30
BEGIN {
30
BEGIN {
31
    # find Koha's Perl modules
31
    # find Koha's Perl modules
32
    # test carefully before changing this
32
    # test carefully before changing this
33
    use FindBin;
33
        eval { require "$FindBin::Bin/../kohalib.pl" };
34
    eval { require "$FindBin::Bin/../kohalib.pl" };
35
}
34
}
36
35
37
use Getopt::Long;
36
use Getopt::Long qw( GetOptions );
38
use Pod::Usage;
37
use Pod::Usage qw( pod2usage );
39
38
40
use C4::Circulation qw( LostItem MarkIssueReturned );
39
use C4::Circulation qw( LostItem MarkIssueReturned );
41
use C4::Context;
40
use C4::Context;
42
use C4::Items qw( sub );
41
use C4::Log qw( cronlogaction );
43
use C4::Log;
44
use Koha::ItemTypes;
42
use Koha::ItemTypes;
45
use Koha::Patron::Categories;
43
use Koha::Patron::Categories;
46
use Koha::Patrons;
44
use Koha::Patrons;
(-)a/misc/cronjobs/membership_expiry.pl (-7 / +5 lines)
Lines 116-135 any field from the branches table Link Here
116
=cut
116
=cut
117
117
118
use Modern::Perl;
118
use Modern::Perl;
119
use Getopt::Long;
119
use Getopt::Long qw( GetOptions );
120
use Pod::Usage;
120
use Pod::Usage qw( pod2usage );
121
use Data::Dumper;
122
BEGIN {
121
BEGIN {
123
    # find Koha's Perl modules
122
    # find Koha's Perl modules
124
    # test carefully before changing this
123
    # test carefully before changing this
125
    use FindBin;
124
        eval { require "$FindBin::Bin/../kohalib.pl" };
126
    eval { require "$FindBin::Bin/../kohalib.pl" };
127
}
125
}
128
126
129
use Koha::Script -cron;
127
use Koha::Script -cron;
130
use C4::Context;
128
use C4::Context;
131
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
129
use C4::Letters ();
132
use C4::Log;
130
use C4::Log qw( cronlogaction );
133
131
134
use Koha::Patrons;
132
use Koha::Patrons;
135
133
(-)a/misc/cronjobs/merge_authorities.pl (-3 / +3 lines)
Lines 1-9 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Getopt::Long;
4
use Getopt::Long qw( GetOptions );
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Time::HiRes qw(gettimeofday);
6
use Time::HiRes qw( gettimeofday );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::AuthoritiesMarc;
9
use C4::AuthoritiesMarc;
(-)a/misc/cronjobs/notice_unprocessed_suggestions.pl (-2 / +2 lines)
Lines 2-9 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Budgets qw( GetBudget );
9
use C4::Budgets qw( GetBudget );
(-)a/misc/cronjobs/overdue_notices.pl (-10 / +9 lines)
Lines 24-46 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
28
}
30
29
31
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
33
use Text::CSV_XS;
32
use Text::CSV_XS ();
34
use DateTime;
33
use DateTime;
35
use DateTime::Duration;
34
use DateTime::Duration;
36
35
37
use Koha::Script -cron;
36
use Koha::Script -cron;
38
use C4::Context;
37
use C4::Context;
39
use C4::Letters qw( getletter get_item_content EnqueueLetter );
38
use C4::Letters ();
40
use C4::Overdues qw( GetBranchcodesWithOverdueRules GetOverdueMessageTransportTypes parse_overdues_letter );
39
use C4::Overdues qw( GetOverdueMessageTransportTypes parse_overdues_letter );
41
use C4::Log;
40
use C4::Log qw( cronlogaction );
42
use Koha::Patron::Debarments qw(AddUniqueDebarment);
41
use Koha::Patron::Debarments qw( AddUniqueDebarment );
43
use Koha::DateUtils;
42
use Koha::DateUtils qw( dt_from_string output_pref );
44
use Koha::Calendar;
43
use Koha::Calendar;
45
use Koha::Libraries;
44
use Koha::Libraries;
46
use Koha::Acquisition::Currencies;
45
use Koha::Acquisition::Currencies;
(-)a/misc/cronjobs/patron_emailer.pl (-5 / +4 lines)
Lines 21-35 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
        eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
25
}
27
26
28
use Koha::Script -cron;
27
use Koha::Script -cron;
29
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
29
use Pod::Usage qw( pod2usage );
31
30
32
use C4::Log;
31
use C4::Log qw( cronlogaction );
33
use C4::Reports::Guided qw( EmailReport );
32
use C4::Reports::Guided qw( EmailReport );
34
33
35
cronlogaction();
34
cronlogaction();
(-)a/misc/cronjobs/plugins_nightly.pl (-2 / +2 lines)
Lines 2-11 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Try::Tiny;
5
use Try::Tiny qw( catch try );
6
6
7
use C4::Context;
7
use C4::Context;
8
use C4::Log;
8
use C4::Log qw( cronlogaction );
9
use Koha::Logger;
9
use Koha::Logger;
10
use Koha::Plugins;
10
use Koha::Plugins;
11
use Koha::Script -cron;
11
use Koha::Script -cron;
(-)a/misc/cronjobs/process_message_queue.pl (-5 / +4 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
use Koha::Script -cron;
28
use Koha::Script -cron;
30
use C4::Letters qw( SendQueuedMessages );
29
use C4::Letters qw( SendQueuedMessages );
31
use C4::Log;
30
use C4::Log qw( cronlogaction );
32
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
33
use Try::Tiny;
32
use Try::Tiny qw( catch try );
34
33
35
my $username = undef;
34
my $username = undef;
36
my $password = undef;
35
my $password = undef;
(-)a/misc/cronjobs/purge_suggestions.pl (-5 / +3 lines)
Lines 22-37 use Modern::Perl; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
31
29
32
use Koha::Script -cron;
30
use Koha::Script -cron;
33
use C4::Suggestions;
31
use C4::Suggestions;
34
use C4::Log;
32
use C4::Log qw( cronlogaction );
35
use C4::Context;
33
use C4::Context;
36
34
37
my ( $help, $days, $confirm );
35
my ( $help, $days, $confirm );
(-)a/misc/cronjobs/reconcile_balances.pl (-6 / +5 lines)
Lines 51-69 Makes the process print information about the taken actions. Link Here
51
51
52
use Modern::Perl;
52
use Modern::Perl;
53
53
54
use Getopt::Long;
54
use Getopt::Long qw( GetOptions );
55
use Pod::Usage;
55
use Pod::Usage qw( pod2usage );
56
use Try::Tiny;
56
use Try::Tiny qw( catch try );
57
57
58
BEGIN {
58
BEGIN {
59
    # find Koha's Perl modules
59
    # find Koha's Perl modules
60
    # test carefully before changing this
60
    # test carefully before changing this
61
    use FindBin;
61
        eval { require "$FindBin::Bin/../kohalib.pl" };
62
    eval { require "$FindBin::Bin/../kohalib.pl" };
63
}
62
}
64
63
65
use Koha::Script -cron;
64
use Koha::Script -cron;
66
use C4::Log;
65
use C4::Log qw( cronlogaction );
67
66
68
use Koha::Account::Lines;
67
use Koha::Account::Lines;
69
use Koha::Patrons;
68
use Koha::Patrons;
(-)a/misc/cronjobs/rss/rss.pl (-2 / +1 lines)
Lines 31-38 use Template; Link Here
31
31
32
use Koha::Script -cron;
32
use Koha::Script -cron;
33
use C4::Context;
33
use C4::Context;
34
use Time::Local;
34
use POSIX qw( close localtime open strftime );
35
use POSIX;
36
35
37
my $dbh     = C4::Context->dbh;
36
my $dbh     = C4::Context->dbh;
38
my $file    = $ARGV[0];
37
my $file    = $ARGV[0];
(-)a/misc/cronjobs/runreport.pl (-8 / +7 lines)
Lines 24-48 use Koha::Script -cron; Link Here
24
use C4::Reports::Guided qw( store_results execute_query );
24
use C4::Reports::Guided qw( store_results execute_query );
25
use Koha::Reports;
25
use Koha::Reports;
26
use C4::Context;
26
use C4::Context;
27
use C4::Log;
27
use C4::Log qw( cronlogaction );
28
use Koha::Email;
28
use Koha::Email;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
30
use Koha::SMTP::Servers;
30
use Koha::SMTP::Servers;
31
31
32
use Getopt::Long qw(:config auto_help auto_version);
32
use Getopt::Long qw(:config auto_help auto_version);
33
use Pod::Usage;
33
use Pod::Usage qw( pod2usage );
34
use Text::CSV::Encoded;
34
use Text::CSV::Encoded;
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use Carp;
36
use Carp qw( carp );
37
use Encode;
37
use Encode qw( decode );
38
use JSON qw( to_json );
38
use JSON qw( to_json );
39
use Try::Tiny;
39
use Try::Tiny qw( catch try );
40
40
41
BEGIN {
41
BEGIN {
42
    # find Koha's Perl modules
42
    # find Koha's Perl modules
43
    # test carefully before changing this
43
    # test carefully before changing this
44
    use FindBin;
44
        eval { require "$FindBin::Bin/../kohalib.pl" };
45
    eval { require "$FindBin::Bin/../kohalib.pl" };
46
}
45
}
47
46
48
=head1 NAME
47
=head1 NAME
(-)a/misc/cronjobs/serialsUpdate.pl (-7 / +6 lines)
Lines 24-43 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
28
}
30
29
31
use Koha::Script -cron;
30
use Koha::Script -cron;
32
use C4::Context;
31
use C4::Context;
33
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
32
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
34
use C4::Log;
33
use C4::Log qw( cronlogaction );
35
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string output_pref );
36
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
35
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
37
36
38
use Date::Calc qw/Date_to_Days check_date/;
37
use Date::Calc qw( check_date Date_to_Days );
39
use Getopt::Long;
38
use Getopt::Long qw( GetOptions );
40
use Pod::Usage;
39
use Pod::Usage qw( pod2usage );
41
40
42
=head1 NAME
41
=head1 NAME
43
42
(-)a/misc/cronjobs/share_usage_with_koha_community.pl (-4 / +4 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Context;
9
use C4::Context;
10
use C4::UsageStats;
10
use C4::UsageStats;
11
use C4::Log;
11
use C4::Log qw( cronlogaction );
12
use POSIX qw(strftime);
12
use POSIX qw( strftime );
13
13
14
my ( $help, $verbose, $force, $quiet );
14
my ( $help, $verbose, $force, $quiet );
15
GetOptions(
15
GetOptions(
(-)a/misc/cronjobs/sitemap.pl (-4 / +3 lines)
Lines 21-32 package Main; Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use utf8;
23
use utf8;
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
26
27
use Koha::Script -cron;
27
use Koha::Script -cron;
28
use C4::Biblio;
28
use Koha::Sitemapper ();
29
use Koha::Sitemapper;
30
29
31
30
32
my ($verbose, $help, $url, $dir, $short) = (0, 0, '', '.', 1);
31
my ($verbose, $help, $url, $dir, $short) = (0, 0, '', '.', 1);
(-)a/misc/cronjobs/staticfines.pl (-9 / +7 lines)
Lines 31-52 BEGIN { Link Here
31
31
32
    # find Koha's Perl modules
32
    # find Koha's Perl modules
33
    # test carefully before changing this
33
    # test carefully before changing this
34
    use FindBin;
34
        eval { require "$FindBin::Bin/kohalib.pl" };
35
    eval { require "$FindBin::Bin/kohalib.pl" };
36
}
35
}
37
36
38
use Date::Calc qw/Date_to_Days/;
37
use Date::Calc qw( Date_to_Days );
39
38
40
use Koha::Script -cron;
39
use Koha::Script -cron;
41
use C4::Context;
40
use C4::Context;
42
use C4::Circulation;
41
use C4::Circulation;
43
use C4::Overdues qw( checkoverdues Getoverdues CalcFine GetFine );
42
use C4::Overdues qw( CalcFine checkoverdues GetFine Getoverdues );
44
use C4::Calendar qw();    # don't need any exports from Calendar
43
use C4::Calendar qw();    # don't need any exports from Calendar
45
use C4::Biblio;
44
use C4::Log qw( cronlogaction );
46
use C4::Log;
45
use Getopt::Long qw( GetOptions );
47
use Getopt::Long;
46
use List::MoreUtils qw( none );
48
use List::MoreUtils qw/none/;
47
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::DateUtils;
50
use Koha::Patrons;
48
use Koha::Patrons;
51
49
52
my $help    = 0;
50
my $help    = 0;
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl (-4 / +3 lines)
Lines 24-35 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
28
}
30
29
31
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
33
32
34
use Koha::Script -cron;
33
use Koha::Script -cron;
35
use C4::Context;
34
use C4::Context;
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-7 / +5 lines)
Lines 24-43 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
28
}
30
29
31
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
33
32
34
use Koha::Script -cron;
33
use Koha::Script -cron;
35
use C4::Context;
34
use C4::Context;
36
use C4::Items;
35
use C4::Letters ();
37
use C4::Letters;
38
use C4::Overdues;
36
use C4::Overdues;
39
use Koha::Calendar;
37
use Koha::Calendar;
40
use Koha::DateUtils;
38
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::Patrons;
39
use Koha::Patrons;
42
use Koha::Libraries;
40
use Koha::Libraries;
43
41
(-)a/misc/cronjobs/update_patrons_category.pl (-5 / +4 lines)
Lines 20-36 use Modern::Perl; Link Here
20
BEGIN {
20
BEGIN {
21
    # find Koha's Perl modules
21
    # find Koha's Perl modules
22
    # test carefully before changing this
22
    # test carefully before changing this
23
    use FindBin;
23
        eval { require "$FindBin::Bin/../kohalib.pl" };
24
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
}
24
}
26
25
27
use C4::Context;
26
use C4::Context;
28
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
28
use Pod::Usage qw( pod2usage );
30
use Koha::Logger;
29
use Koha::Logger;
31
use Koha::Patrons;
30
use Koha::Patrons;
32
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
33
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Script -cron;
33
use Koha::Script -cron;
35
34
36
=head1 NAME
35
=head1 NAME
(-)a/misc/cronjobs/update_totalissues.pl (-8 / +7 lines)
Lines 24-45 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
        eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
28
}
30
29
31
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
33
32
34
use Koha::Script -cron;
33
use Koha::Script -cron;
35
use Koha::DateUtils qw/ dt_from_string /;
34
use Koha::DateUtils qw( dt_from_string );
36
use C4::Context;
35
use C4::Context;
37
use C4::Biblio qw( UpdateTotalIssues );
36
use C4::Biblio qw( UpdateTotalIssues );
38
use C4::Log;
37
use C4::Log qw( cronlogaction );
39
use DateTime;
38
use DateTime;
40
use DateTime::Format::MySQL;
39
use DateTime::Format::MySQL;
41
use Time::HiRes qw/time/;
40
use Time::HiRes qw( time );
42
use POSIX qw/strftime ceil/;
41
use POSIX qw( ceil strftime );
43
42
44
sub usage {
43
sub usage {
45
    pod2usage( -verbose => 2 );
44
    pod2usage( -verbose => 2 );
(-)a/misc/cronjobs/writeoff_debts.pl (-3 / +3 lines)
Lines 3-13 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use feature 'say';
4
use feature 'say';
5
5
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
use Pod::Usage;
7
use Pod::Usage qw( pod2usage );
8
8
9
use Koha::Account::Lines;
9
use Koha::Account::Lines;
10
use Koha::DateUtils;
10
use Koha::DateUtils qw( dt_from_string );
11
11
12
use Koha::Script -cron;
12
use Koha::Script -cron;
13
13
(-)a/misc/devel/add_missing_filters.pl (-3 / +3 lines)
Lines 2-10 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use File::Slurp;
5
use File::Slurp qw( read_file write_file );
6
use Pod::Usage;
6
use Pod::Usage qw( pod2usage );
7
use Getopt::Long;
7
use Getopt::Long qw( GetOptions );
8
8
9
use t::lib::QA::TemplateFilters;
9
use t::lib::QA::TemplateFilters;
10
10
(-)a/misc/devel/coverage.pl (-3 / +3 lines)
Lines 48-56 prints this help text Link Here
48
use Modern::Perl;
48
use Modern::Perl;
49
49
50
use C4::Context;
50
use C4::Context;
51
use Cwd;
51
use Cwd qw( getcwd );
52
use Getopt::Long;
52
use Getopt::Long qw( GetOptions );
53
use Pod::Usage;
53
use Pod::Usage qw( pod2usage );
54
54
55
my $help;
55
my $help;
56
56
(-)a/misc/devel/create_superlibrarian.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use Pod::Usage;
22
use Pod::Usage qw( pod2usage );
23
23
24
use Koha::Script;
24
use Koha::Script;
25
use Koha::Patrons;
25
use Koha::Patrons;
(-)a/misc/devel/get_prepared_letter.pl (-3 / +3 lines)
Lines 69-77 documentation of GetPreparedLetter for more informations. Link Here
69
69
70
use Modern::Perl;
70
use Modern::Perl;
71
71
72
use Getopt::Long;
72
use Getopt::Long qw( GetOptions );
73
use JSON;
73
use JSON qw( decode_json );
74
use Pod::Usage;
74
use Pod::Usage qw( pod2usage );
75
75
76
use C4::Letters qw( GetPreparedLetter );
76
use C4::Letters qw( GetPreparedLetter );
77
77
(-)a/misc/devel/install_plugins.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use Pod::Usage;
22
use Pod::Usage qw( pod2usage );
23
23
24
use Koha::Script;
24
use Koha::Script;
25
25
(-)a/misc/devel/update_dbix_class_files.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
22
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
23
23
24
use Getopt::Long;
24
use Getopt::Long qw( GetOptions );
25
use Pod::Usage;
25
use Pod::Usage qw( pod2usage );
26
26
27
my %db_defaults = (
27
my %db_defaults = (
28
    driver => 'mysql',
28
    driver => 'mysql',
(-)a/misc/export_records.pl (-3 / +3 lines)
Lines 18-26 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use MARC::File::XML;
20
use MARC::File::XML;
21
use List::MoreUtils qw(uniq);
21
use List::MoreUtils qw( uniq );
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Auth;
26
use C4::Auth;
(-)a/misc/exportauth.pl (-3 / +1 lines)
Lines 8-20 use strict; Link Here
8
BEGIN {
8
BEGIN {
9
    # find Koha's Perl modules
9
    # find Koha's Perl modules
10
    # test carefully before changing this
10
    # test carefully before changing this
11
    use FindBin;
11
        eval { require "$FindBin::Bin/kohalib.pl" };
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
12
}
14
13
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio;
18
use C4::Auth;
16
use C4::Auth;
19
my $outfile = $ARGV[0];
17
my $outfile = $ARGV[0];
20
open(my $fh, '>', $outfile) or die $!;
18
open(my $fh, '>', $outfile) or die $!;
(-)a/misc/import_patrons.pl (-3 / +3 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use Koha::Patrons::Import;
26
use Koha::Patrons::Import ();
27
my $Import = Koha::Patrons::Import->new();
27
my $Import = Koha::Patrons::Import->new();
28
28
29
my $csv_file;
29
my $csv_file;
(-)a/misc/link_bibs_to_authorities.pl (-9 / +12 lines)
Lines 7-25 BEGIN { Link Here
7
7
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
11
}
13
12
14
use Koha::Script;
13
use Koha::Script;
15
use C4::Context;
14
use C4::Context;
16
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode LinkBibHeadingsToAuthorities ModBiblio );
15
use C4::Biblio qw(
17
use Getopt::Long;
16
    GetFrameworkCode
18
use Pod::Usage;
17
    GetMarcBiblio
19
use Data::Dumper;
18
    LinkBibHeadingsToAuthorities
20
use Time::HiRes qw/time/;
19
    ModBiblio
21
use POSIX qw/strftime ceil/;
20
);
22
use Module::Load::Conditional qw(can_load);
21
use Getopt::Long qw( GetOptions );
22
use Pod::Usage qw( pod2usage );
23
use Time::HiRes qw( time );
24
use POSIX qw( ceil strftime );
25
use Module::Load::Conditional qw( can_load );
23
26
24
sub usage {
27
sub usage {
25
    pod2usage( -verbose => 2 );
28
    pod2usage( -verbose => 2 );
(-)a/misc/load_testing/benchmark_circulation.pl (-4 / +2 lines)
Lines 7-19 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
11
}
13
12
14
use HTTPD::Bench::ApacheBench;
13
use HTTPD::Bench::ApacheBench;
15
use LWP::UserAgent;
14
use LWP::UserAgent ();
16
use Data::Dumper;
17
use HTTP::Cookies;
15
use HTTP::Cookies;
18
use C4::Context;
16
use C4::Context;
19
17
(-)a/misc/load_testing/benchmark_staff.pl (-6 / +4 lines)
Lines 7-23 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
11
}
13
12
14
use Getopt::Long;
13
use Getopt::Long qw( GetOptions );
15
use HTTPD::Bench::ApacheBench;
14
use HTTPD::Bench::ApacheBench;
16
use LWP::UserAgent;
15
use LWP::UserAgent ();
17
use Data::Dumper;
18
use HTTP::Cookies;
16
use HTTP::Cookies;
19
use C4::Context;
17
use C4::Context;
20
use URI::Escape;
18
use URI::Escape qw( uri_escape_utf8 );
21
use Koha::Patrons;
19
use Koha::Patrons;
22
20
23
my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
21
my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
(-)a/misc/load_testing/benchmark_webservices.pl (-3 / +2 lines)
Lines 15-23 use warnings; Link Here
15
# records/xml/xml-recs.xml = file of 1 marcxml record to post
15
# records/xml/xml-recs.xml = file of 1 marcxml record to post
16
#
16
#
17
# Requires LWP::UserAgent, File::Slurp.
17
# Requires LWP::UserAgent, File::Slurp.
18
use LWP::UserAgent;
18
use LWP::UserAgent ();
19
use File::Slurp qw(slurp);
19
use File::Slurp qw( slurp );
20
use Carp;
21
my $ua = LWP::UserAgent->new();
20
my $ua = LWP::UserAgent->new();
22
$ua->cookie_jar({ file =>"cookies.txt" });
21
$ua->cookie_jar({ file =>"cookies.txt" });
23
my $baseurl = shift;
22
my $baseurl = shift;
(-)a/misc/load_yaml.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use Koha::Script;
22
use Koha::Script;
23
use Getopt::Long qw(:config no_ignore_case);
23
use Getopt::Long qw(:config no_ignore_case);
24
use C4::Context;
24
use C4::Context;
25
use C4::Installer;
25
use C4::Installer ();
26
26
27
sub print_usage {
27
sub print_usage {
28
     ( my $basename = $0 ) =~ s|.*/||;
28
     ( my $basename = $0 ) =~ s|.*/||;
(-)a/misc/maintenance/UNIMARC_fix_collectiontitle.pl (-3 / +1 lines)
Lines 8-19 use strict; Link Here
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
10
BEGIN {
11
    use FindBin;
11
        eval { require "$FindBin::Bin/../kohalib.pl" };
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
12
}
14
13
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Biblio;
17
15
18
sub process {
16
sub process {
19
17
(-)a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl (-3 / +2 lines)
Lines 8-20 use strict; Link Here
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
10
BEGIN {
11
    use FindBin;
11
        eval { require "$FindBin::Bin/../kohalib.pl" };
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
12
}
14
13
15
use Koha::Script;
14
use Koha::Script;
16
use C4::Biblio qw( GetMarcBiblio ModBiblio );
15
use C4::Biblio qw( GetMarcBiblio ModBiblio );
17
use Getopt::Long;
16
use Getopt::Long qw( GetOptions );
18
17
19
sub _read_marc_code {
18
sub _read_marc_code {
20
    my $input = shift;
19
    my $input = shift;
(-)a/misc/maintenance/auth_show_hidden_data.pl (-2 / +2 lines)
Lines 22-29 Link Here
22
# which hidden fields in the framework still contain data.
22
# which hidden fields in the framework still contain data.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
use Pod::Usage;
26
use Pod::Usage qw( pod2usage );
27
27
28
use Koha::Script;
28
use Koha::Script;
29
use Koha::Authorities;
29
use Koha::Authorities;
(-)a/misc/maintenance/borrowers-force-messaging-defaults.pl (-4 / +3 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
use Koha::Script;
28
use Koha::Script;
30
use C4::Context;
29
use C4::Context;
31
use C4::Members::Messaging;
30
use C4::Members::Messaging;
32
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
33
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
34
33
35
34
36
sub usage {
35
sub usage {
(-)a/misc/maintenance/check_syspref_cache.pl (-2 / +2 lines)
Lines 16-23 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
20
use Pod::Usage;
20
use Pod::Usage qw( pod2usage );
21
use Encode qw( encode_utf8 );
21
use Encode qw( encode_utf8 );
22
22
23
use Koha::Script;
23
use Koha::Script;
(-)a/misc/maintenance/cmp_sysprefs.pl (-2 / +2 lines)
Lines 27-34 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use open OUT => ':encoding(UTF-8)', ':std';
28
use open OUT => ':encoding(UTF-8)', ':std';
29
29
30
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
31
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
32
32
33
use Koha::Script;
33
use Koha::Script;
34
use C4::Context;
34
use C4::Context;
(-)a/misc/maintenance/fix_accountlines_date.pl (-5 / +3 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
use Koha::Script;
28
use Koha::Script;
30
use C4::Context;
29
use C4::Context;
31
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
31
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils;
34
32
35
=head1 NAME
33
=head1 NAME
36
34
(-)a/misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl (-5 / +3 lines)
Lines 23-38 use warnings; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
        eval { require "$FindBin::Bin/../kohalib.pl" };
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
27
}
29
28
30
use Koha::Script;
29
use Koha::Script;
31
use C4::Context;
30
use C4::Context;
32
use C4::Installer;
33
31
34
use Getopt::Long;
32
use Getopt::Long qw( GetOptions );
35
use Data::Dumper;
33
use Data::Dumper ();
36
34
37
sub print_usage {
35
sub print_usage {
38
    print <<_USAGE_
36
    print <<_USAGE_
(-)a/misc/maintenance/fix_mysql_constraints.pl (-5 / +4 lines)
Lines 21-34 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
        my $lib = "$FindBin::Bin/../kohalib.pl";
25
    my $lib = "$FindBin::Bin/../kohalib.pl";
26
    eval { require $lib };
25
    eval { require $lib };
27
}
26
}
28
27
29
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
29
use Pod::Usage qw( pod2usage );
31
use Try::Tiny;
30
use Try::Tiny qw( catch try );
32
use Koha::Script;
31
use Koha::Script;
33
use C4::Context;
32
use C4::Context;
34
33
(-)a/misc/maintenance/fix_tags_weight.pl (-3 / +3 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Tags qw( add_tag_approval add_tag );
23
use C4::Tags ();
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use Koha::Database;
26
use Koha::Database;
Lines 28-35 use Koha::Tags; Link Here
28
use Koha::Tags::Approvals;
28
use Koha::Tags::Approvals;
29
use Koha::Tags::Indexes;
29
use Koha::Tags::Indexes;
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
33
34
=head1 NAME
34
=head1 NAME
35
35
(-)a/misc/maintenance/generate_MARC21Languages.pl (-4 / +4 lines)
Lines 19-28 Link Here
19
#
19
#
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use XML::Simple;
22
use XML::Simple qw( XMLin );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
use Getopt::Long;
24
use Getopt::Long qw( GetOptions );
25
use Carp;
25
use Carp qw( croak );
26
26
27
use open ':std', ':encoding(UTF-8)';
27
use open ':std', ':encoding(UTF-8)';
28
28
(-)a/misc/maintenance/process_record_through_filter.pl (-1 lines)
Lines 9-15 use warnings; Link Here
9
9
10
use Koha::Script;
10
use Koha::Script;
11
use Koha::RecordProcessor;
11
use Koha::RecordProcessor;
12
use Data::Dumper;
13
use C4::Biblio qw( GetMarcBiblio );
12
use C4::Biblio qw( GetMarcBiblio );
14
13
15
my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
14
my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
(-)a/misc/maintenance/remove_items_from_biblioitems.pl (-2 / +2 lines)
Lines 24-31 $|=1; Link Here
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Context;
26
use C4::Context;
27
use C4::Biblio qw( GetMarcBiblio ModBiblio GetFrameworkCode );
27
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio );
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
29
30
my ($wherestring, $run, $silent, $want_help);
30
my ($wherestring, $run, $silent, $want_help);
31
my $result = GetOptions(
31
my $result = GetOptions(
(-)a/misc/maintenance/sanitize_records.pl (-5 / +4 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Koha::Script;
22
use Koha::Script;
23
use C4::Charset qw( SanitizeRecord );
23
use C4::Charset ();
24
use C4::Context;
24
use C4::Context;
25
use DBI;
25
use C4::Biblio ();
26
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode ModBiblio );
26
use Getopt::Long qw( GetOptions );
27
use Getopt::Long;
27
use Pod::Usage qw( pod2usage );
28
use Pod::Usage;
29
28
30
my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
29
my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
31
    $auto_search, $fix_ampersand );
30
    $auto_search, $fix_ampersand );
(-)a/misc/maintenance/search_for_data_inconsistencies.pl (-1 / +1 lines)
Lines 25-31 use Koha::BiblioFrameworks; Link Here
25
use Koha::Biblioitems;
25
use Koha::Biblioitems;
26
use Koha::Items;
26
use Koha::Items;
27
use Koha::ItemTypes;
27
use Koha::ItemTypes;
28
use C4::Biblio qw( GetMarcFromKohaField );
28
use C4::Biblio ();
29
29
30
{
30
{
31
    my $items = Koha::Items->search({ -or => { homebranch => undef, holdingbranch => undef }});
31
    my $items = Koha::Items->search({ -or => { homebranch => undef, holdingbranch => undef }});
(-)a/misc/maintenance/touch_all_biblios.pl (-4 / +3 lines)
Lines 22-38 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
# possible modules to use
28
# possible modules to use
30
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
31
30
32
use Koha::Script;
31
use Koha::Script;
33
use C4::Context;
32
use C4::Context;
34
use C4::Biblio qw( GetMarcBiblio ModBiblio );
33
use C4::Biblio qw( GetMarcBiblio ModBiblio );
35
use Pod::Usage;
34
use Pod::Usage qw( pod2usage );
36
35
37
36
38
sub usage {
37
sub usage {
(-)a/misc/maintenance/touch_all_items.pl (-5 / +3 lines)
Lines 22-39 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
        eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
26
}
28
27
29
# possible modules to use
28
# possible modules to use
30
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
31
30
32
use Koha::Script;
31
use Koha::Script;
33
use C4::Context;
32
use C4::Context;
34
use C4::Items qw( sub );
35
use Koha::Items;
33
use Koha::Items;
36
use Pod::Usage;
34
use Pod::Usage qw( pod2usage );
37
35
38
36
39
sub usage {
37
sub usage {
(-)a/misc/maintenance/update_authorities.pl (-3 / +3 lines)
Lines 19-27 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use List::MoreUtils qw/uniq/;
23
use List::MoreUtils qw( uniq );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/;
27
use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/;
(-)a/misc/migration_tools/22_to_30/convert_to_utf8.pl (-2 / +1 lines)
Lines 9-16 BEGIN { Link Here
9
9
10
    # find Koha's Perl modules
10
    # find Koha's Perl modules
11
    # test carefully before changing this
11
    # test carefully before changing this
12
    use FindBin;
12
        eval { require "$FindBin::Bin/../../kohalib.pl" };
13
    eval { require "$FindBin::Bin/../../kohalib.pl" };
14
}
13
}
15
14
16
use C4::Context;
15
use C4::Context;
(-)a/misc/migration_tools/22_to_30/export_Authorities.pl (-4 / +2 lines)
Lines 3-17 use Modern::Perl; Link Here
3
BEGIN {
3
BEGIN {
4
    # find Koha's Perl modules
4
    # find Koha's Perl modules
5
    # test carefully before changing this
5
    # test carefully before changing this
6
    use FindBin;
6
        eval { require "$FindBin::Bin/../../kohalib.pl" };
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
7
}
9
use C4::Context;
8
use C4::Context;
10
#use MARC::File::XML(BinaryEncoding=>"utf8");
9
#use MARC::File::XML(BinaryEncoding=>"utf8");
11
#use MARC::File::USMARC;
10
#use MARC::File::USMARC;
12
use MARC::Record;
13
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
14
use POSIX;
12
use POSIX qw( close localtime sprintf time );
15
#MARC::File::XML::default_record_format("UNIMARCAUTH");
13
#MARC::File::XML::default_record_format("UNIMARCAUTH");
16
my $dbh = C4::Context->dbh;
14
my $dbh = C4::Context->dbh;
17
my $rq= $dbh->prepare(qq|
15
my $rq= $dbh->prepare(qq|
(-)a/misc/migration_tools/22_to_30/export_Authorities_xml.pl (-4 / +2 lines)
Lines 3-16 use Modern::Perl; Link Here
3
BEGIN {
3
BEGIN {
4
    # find Koha's Perl modules
4
    # find Koha's Perl modules
5
    # test carefully before changing this
5
    # test carefully before changing this
6
    use FindBin;
6
        eval { require "$FindBin::Bin/../../kohalib.pl" };
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
7
}
9
use C4::Context;
8
use C4::Context;
10
use MARC::File::XML(BinaryEncoding=>"utf8");
9
use MARC::File::XML(BinaryEncoding=>"utf8");
11
use MARC::Record;
12
use C4::AuthoritiesMarc;
10
use C4::AuthoritiesMarc;
13
use POSIX;
11
use POSIX qw( close localtime open sprintf time );
14
MARC::File::XML::default_record_format("UNIMARCAUTH");
12
MARC::File::XML::default_record_format("UNIMARCAUTH");
15
my $dbh = C4::Context->dbh;
13
my $dbh = C4::Context->dbh;
16
my $rq= $dbh->prepare(qq|
14
my $rq= $dbh->prepare(qq|
(-)a/misc/migration_tools/22_to_30/missing090field.pl (-4 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
11
}
13
12
14
# Koha modules used
13
# Koha modules used
15
14
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio;
16
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
17
use MARC::File::USMARC;
20
18
21
$|=1;
19
$|=1;
(-)a/misc/migration_tools/22_to_30/move_marc_to_authheader.pl (-3 / +2 lines)
Lines 7-18 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
11
}
13
use C4::Context;
12
use C4::Context;
14
use C4::AuthoritiesMarc;
13
use C4::AuthoritiesMarc;
15
use MARC::Record;
14
use MARC::Record ();
16
use MARC::File::XML ( BinaryEncoding => 'utf8' );
15
use MARC::File::XML ( BinaryEncoding => 'utf8' );
17
16
18
print "moving MARC record to marc_header table\n";
17
print "moving MARC record to marc_header table\n";
(-)a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl (-4 / +2 lines)
Lines 5-16 use Modern::Perl; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
        eval { require "$FindBin::Bin/../../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../../kohalib.pl" };
10
}
9
}
11
use C4::Context;
10
use C4::Context;
12
use C4::Biblio;
11
use MARC::Record ();
13
use MARC::Record;
14
use MARC::File::XML ( BinaryEncoding => 'utf8' );
12
use MARC::File::XML ( BinaryEncoding => 'utf8' );
15
13
16
print "moving MARC record to biblioitems table\n";
14
print "moving MARC record to biblioitems table\n";
(-)a/misc/migration_tools/22_to_30/rebuild_leader.pl (-4 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
11
}
13
12
14
# Koha modules used
13
# Koha modules used
15
14
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio;
16
use C4::Biblio qw( ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
17
use MARC::File::USMARC;
20
18
21
19
(-)a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl (-4 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
        eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
11
}
13
12
14
# Koha modules used
13
# Koha modules used
15
14
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio;
16
use C4::Biblio qw( GetMarcBiblio ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
17
use MARC::File::USMARC;
20
18
21
19
(-)a/misc/migration_tools/buildCOUNTRY.pl (-3 / +2 lines)
Lines 8-18 use strict; Link Here
8
# Koha modules used
8
# Koha modules used
9
use Koha::Script;
9
use Koha::Script;
10
use C4::Context;
10
use C4::Context;
11
use C4::Biblio;
12
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
13
use Time::HiRes qw(gettimeofday);
12
use Time::HiRes qw( gettimeofday );
14
13
15
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
16
my ( $fields, $number,$language) = ('',0);
15
my ( $fields, $number,$language) = ('',0);
17
my ($version, $verbose, $test_parameter, $delete);
16
my ($version, $verbose, $test_parameter, $delete);
18
GetOptions(
17
GetOptions(
(-)a/misc/migration_tools/buildEDITORS.pl (-3 / +3 lines)
Lines 6-20 use strict; Link Here
6
6
7
# Koha modules used
7
# Koha modules used
8
use MARC::File::USMARC;
8
use MARC::File::USMARC;
9
use MARC::Record;
9
use MARC::Record ();
10
use MARC::Batch;
10
use MARC::Batch;
11
use Koha::Script;
11
use Koha::Script;
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio qw( GetMarcBiblio );
13
use C4::Biblio qw( GetMarcBiblio );
14
use C4::AuthoritiesMarc;
14
use C4::AuthoritiesMarc;
15
use Time::HiRes qw(gettimeofday);
15
use Time::HiRes qw( gettimeofday );
16
16
17
use Getopt::Long;
17
use Getopt::Long qw( GetOptions );
18
my ( $input_marc_file, $number) = ('',0);
18
my ( $input_marc_file, $number) = ('',0);
19
my ($version, $verbose, $test_parameter, $confirm,$delete);
19
my ($version, $verbose, $test_parameter, $confirm,$delete);
20
GetOptions(
20
GetOptions(
(-)a/misc/migration_tools/buildLANG.pl (-3 / +2 lines)
Lines 8-18 use strict; Link Here
8
# Koha modules used
8
# Koha modules used
9
use Koha::Script;
9
use Koha::Script;
10
use C4::Context;
10
use C4::Context;
11
use C4::Biblio;
12
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
13
use Time::HiRes qw(gettimeofday);
12
use Time::HiRes qw( gettimeofday );
14
13
15
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
16
my ( $fields, $number,$language) = ('',0);
15
my ( $fields, $number,$language) = ('',0);
17
my ($version, $verbose, $test_parameter, $delete);
16
my ($version, $verbose, $test_parameter, $delete);
18
GetOptions(
17
GetOptions(
(-)a/misc/migration_tools/build_oai_sets.pl (-5 / +13 lines)
Lines 37-52 oai_sets_mappings, and then fill table oai_sets_biblios with builded infos. Link Here
37
=cut
37
=cut
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
use MARC::Record;
40
use MARC::Record ();
41
use MARC::File::XML;
41
use MARC::File::XML;
42
use List::MoreUtils qw/uniq/;
42
use List::MoreUtils qw( uniq );
43
use Getopt::Std;
43
use Getopt::Std qw( getopts );
44
44
45
use Koha::Script;
45
use Koha::Script;
46
use C4::Context;
46
use C4::Context;
47
use C4::Charset qw( StripNonXmlChars );
47
use C4::Charset qw( StripNonXmlChars );
48
use C4::Biblio qw( EmbedItemsInMarcBiblio );
48
use C4::Biblio ();
49
use C4::OAI::Sets;
49
use C4::OAI::Sets qw(
50
    AddOAISetsBiblios
51
    CalcOAISetsBiblio
52
    GetOAISet
53
    GetOAISetBySpec
54
    GetOAISets
55
    GetOAISetsMappings
56
    ModOAISetsBiblios
57
);
50
58
51
my %opts;
59
my %opts;
52
$Getopt::Std::STANDARD_HELP_VERSION = 1;
60
$Getopt::Std::STANDARD_HELP_VERSION = 1;
(-)a/misc/migration_tools/bulkmarcimport.pl (-15 / +20 lines)
Lines 6-37 use Modern::Perl; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
        eval { require "$FindBin::Bin/../kohalib.pl" };
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
11
}
10
}
12
11
13
# Koha modules used
12
# Koha modules used
14
use MARC::File::USMARC;
13
use MARC::File::USMARC;
15
use MARC::File::XML;
14
use MARC::File::XML;
16
use MARC::Record;
17
use MARC::Batch;
15
use MARC::Batch;
18
use MARC::Charset;
16
use Encode ();
19
use Encode;
20
17
21
use Koha::Script;
18
use Koha::Script;
22
use C4::Context;
19
use C4::Context;
23
use C4::Biblio qw( GetMarcFromKohaField ModBiblio AddBiblio _strip_item_fields ModBiblioMarc );
20
use C4::Biblio qw(
21
    _strip_item_fields
22
    AddBiblio
23
    GetMarcFromKohaField
24
    ModBiblio
25
    ModBiblioMarc
26
);
24
use C4::Koha;
27
use C4::Koha;
25
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
28
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
26
use C4::Items qw( sub AddItemBatchFromMarc );
29
use C4::Items qw( AddItemBatchFromMarc );
27
use C4::MarcModificationTemplates;
30
use C4::MarcModificationTemplates qw(
28
31
    GetModificationTemplates
29
use YAML::XS;
32
    ModifyRecordWithTemplate
30
use Unicode::Normalize;
33
);
31
use Time::HiRes qw(gettimeofday);
34
32
use Getopt::Long;
35
use YAML::XS ();
33
use IO::File;
36
use Time::HiRes qw( gettimeofday );
34
use Pod::Usage;
37
use Getopt::Long qw( GetOptions );
38
use IO::File ();
39
use Pod::Usage qw( pod2usage );
35
40
36
use Koha::Logger;
41
use Koha::Logger;
37
use Koha::Biblios;
42
use Koha::Biblios;
(-)a/misc/migration_tools/checkNonIndexedBiblios.pl (-4 / +2 lines)
Lines 27-41 BEGIN { Link Here
27
27
28
    # find Koha's Perl modules
28
    # find Koha's Perl modules
29
    # test carefully before changing this
29
    # test carefully before changing this
30
    use FindBin;
30
        eval { require "$FindBin::Bin/kohalib.pl" };
31
    eval { require "$FindBin::Bin/kohalib.pl" };
32
}
31
}
33
32
34
# Koha modules used
33
# Koha modules used
35
use MARC::Record;
36
use Koha::Script;
34
use Koha::Script;
37
use C4::Context;
35
use C4::Context;
38
use Getopt::Long;
36
use Getopt::Long qw( GetOptions );
39
37
40
use Koha::SearchEngine::Search;
38
use Koha::SearchEngine::Search;
41
39
(-)a/misc/migration_tools/create_analytical_rel.pl (-4 / +2 lines)
Lines 5-20 use strict; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
        eval { require "$FindBin::Bin/../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
9
}
11
10
12
use Koha::Script;
11
use Koha::Script;
13
use C4::Context;
12
use C4::Context;
14
use C4::Biblio qw( GetMarcBiblio ModBiblio );
13
use C4::Biblio qw( GetMarcBiblio ModBiblio );
15
use C4::Items qw( sub );
16
use Koha::Items;
14
use Koha::Items;
17
use Getopt::Long;
15
use Getopt::Long qw( GetOptions );
18
16
19
$| = 1;
17
$| = 1;
20
18
(-)a/misc/migration_tools/ifla/update.pl (-5 / +5 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Date::Format;
22
use Date::Format qw( time2str );
23
use File::Basename;
23
use File::Basename qw( basename );
24
use FindBin qw($Bin);
24
use FindBin qw( $Bin );
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
use Locale::PO;
26
use Locale::PO;
27
use YAML::XS;
27
use YAML::XS ();
28
use utf8;
28
use utf8;
29
29
30
use Koha::Database;
30
use Koha::Database;
(-)a/misc/migration_tools/import_lexile.pl (-3 / +2 lines)
Lines 28-34 use utf8; Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Text::CSV;
32
use Text::CSV;
33
33
34
use Koha::Script;
34
use Koha::Script;
Lines 45-52 BEGIN { Link Here
45
45
46
    # find Koha's Perl modules
46
    # find Koha's Perl modules
47
    # test carefully before changing this
47
    # test carefully before changing this
48
    use FindBin;
48
        eval { require "$FindBin::Bin/../kohalib.pl" };
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
49
}
51
50
52
my $help;
51
my $help;
(-)a/misc/migration_tools/koha-svc.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use warnings;
20
use warnings;
21
use strict;
21
use strict;
22
22
23
use LWP::UserAgent;
23
use LWP::UserAgent ();
24
use File::Slurp;
24
use File::Slurp qw( read_file write_file );
25
25
26
if ( $#ARGV >= 3 && ! caller ) { # process command-line params only if not called as module!
26
if ( $#ARGV >= 3 && ! caller ) { # process command-line params only if not called as module!
27
    my ( $url, $user, $password, $biblionumber, $file ) = @ARGV;
27
    my ( $url, $user, $password, $biblionumber, $file ) = @ARGV;
(-)a/misc/migration_tools/rebuild_zebra.pl (-6 / +6 lines)
Lines 19-34 use Modern::Perl; Link Here
19
19
20
use Koha::Script;
20
use Koha::Script;
21
use C4::Context;
21
use C4::Context;
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Fcntl qw(:flock);
23
use Fcntl qw(:flock);
24
use File::Temp qw/ tempdir /;
24
use File::Temp qw( tempdir );
25
use File::Path;
25
use File::Path qw( mkpath rmtree );
26
use C4::Biblio qw( GetMarcFromKohaField GetXmlBiblio GetMarcBiblio _koha_marc_update_bib_ids );
26
use C4::Biblio qw( _koha_marc_update_bib_ids GetXmlBiblio );
27
use C4::AuthoritiesMarc;
27
use C4::AuthoritiesMarc;
28
use C4::Items qw( sub GetItemsInfo Item2Marc );
28
use C4::Items qw( GetItemsInfo Item2Marc );
29
use Koha::RecordProcessor;
29
use Koha::RecordProcessor;
30
use Koha::Caches;
30
use Koha::Caches;
31
use XML::LibXML;
31
use XML::LibXML ();
32
32
33
use constant LOCK_FILENAME => 'rebuild..LCK';
33
use constant LOCK_FILENAME => 'rebuild..LCK';
34
34
(-)a/misc/migration_tools/remove_unused_authorities.pl (-1 / +1 lines)
Lines 25-31 use Modern::Perl; Link Here
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Context;
26
use C4::Context;
27
use C4::AuthoritiesMarc;
27
use C4::AuthoritiesMarc;
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
29
30
use Koha::SearchEngine::Search;
30
use Koha::SearchEngine::Search;
31
31
(-)a/misc/migration_tools/switch_marc21_series_info.pl (-4 / +3 lines)
Lines 25-38 use warnings; Link Here
25
BEGIN {
25
BEGIN {
26
    # find Koha's Perl modules
26
    # find Koha's Perl modules
27
    # test carefully before changing this
27
    # test carefully before changing this
28
    use FindBin;
28
        eval { require "$FindBin::Bin/../kohalib.pl" };
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
29
}
31
30
32
use Koha::Script;
31
use Koha::Script;
33
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio ModBiblioMarc );
32
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
34
use C4::Context;
33
use C4::Context;
35
use Getopt::Long;
34
use Getopt::Long qw( GetOptions );
36
35
37
my $commit;
36
my $commit;
38
my $add_links;
37
my $add_links;
(-)a/misc/migration_tools/upgradeitems.pl (-1 / +1 lines)
Lines 5-11 use strict; Link Here
5
5
6
use Koha::Script;
6
use Koha::Script;
7
use C4::Context;
7
use C4::Context;
8
use C4::Items qw( sub ModItemFromMarc );
8
use C4::Items qw( ModItemFromMarc );
9
use C4::Biblio qw( GetMarcBiblio );
9
use C4::Biblio qw( GetMarcBiblio );
10
10
11
my $dbh=C4::Context->dbh;
11
my $dbh=C4::Context->dbh;
(-)a/misc/mod_zebraqueue.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::Biblio qw( ModZebra );
27
use C4::Biblio qw( ModZebra );
(-)a/misc/recreateIssueStatistics.pl (-3 / +1 lines)
Lines 25-33 use warnings; Link Here
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::Context;
27
use C4::Context;
28
use C4::Items qw( sub );
28
use Getopt::Long qw( GetOptions );
29
use Data::Dumper;
30
use Getopt::Long;
31
use Koha::Items;
29
use Koha::Items;
32
30
33
my $dbh = C4::Context->dbh;
31
my $dbh = C4::Context->dbh;
(-)a/misc/sax_parser_test.pl (-2 / +2 lines)
Lines 3-10 Link Here
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
5
6
use XML::SAX;
6
use XML::SAX ();
7
use Encode;
7
use Encode qw( encode_utf8 );
8
8
9
my $parser = XML::SAX::ParserFactory->parser(
9
my $parser = XML::SAX::ParserFactory->parser(
10
Handler => MySAXHandler->new
10
Handler => MySAXHandler->new
(-)a/misc/search_tools/export_elasticsearch_mappings.pl (-4 / +4 lines)
Lines 52-58 Full documentation. Link Here
52
=cut
52
=cut
53
53
54
use Modern::Perl;
54
use Modern::Perl;
55
use Encode;
55
use Encode ();
56
56
57
use Koha::Script;
57
use Koha::Script;
58
use Koha::Database;
58
use Koha::Database;
Lines 60-68 use Koha::SearchFields; Link Here
60
use Koha::SearchMarcMaps;
60
use Koha::SearchMarcMaps;
61
use Koha::SearchEngine::Elasticsearch;
61
use Koha::SearchEngine::Elasticsearch;
62
62
63
use YAML::XS;
63
use YAML::XS ();
64
use Getopt::Long;
64
use Getopt::Long qw( GetOptions );
65
use Pod::Usage;
65
use Pod::Usage qw( pod2usage );
66
66
67
my $type = '';
67
my $type = '';
68
my $man;
68
my $man;
(-)a/misc/search_tools/rebuild_elasticsearch.pl (-4 / +3 lines)
Lines 112-118 Full documentation. Link Here
112
=cut
112
=cut
113
113
114
use autodie;
114
use autodie;
115
use Getopt::Long;
115
use Getopt::Long qw( GetOptions );
116
use Koha::Script;
116
use Koha::Script;
117
use C4::Context;
117
use C4::Context;
118
use Koha::MetadataRecord::Authority;
118
use Koha::MetadataRecord::Authority;
Lines 120-129 use Koha::BiblioUtils; Link Here
120
use Koha::SearchEngine::Elasticsearch;
120
use Koha::SearchEngine::Elasticsearch;
121
use Koha::SearchEngine::Elasticsearch::Indexer;
121
use Koha::SearchEngine::Elasticsearch::Indexer;
122
use MARC::Field;
122
use MARC::Field;
123
use MARC::Record;
124
use Modern::Perl;
123
use Modern::Perl;
125
use Pod::Usage;
124
use Pod::Usage qw( pod2usage );
126
use Try::Tiny;
125
use Try::Tiny qw( catch try );
127
126
128
my $verbose = 0;
127
my $verbose = 0;
129
my $commit = 5000;
128
my $commit = 5000;
(-)a/misc/sip_cli_emulator.pl (-4 / +4 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Socket qw(:crlf);
22
use Socket qw(:crlf);
23
use IO::Socket::INET;
23
use IO::Socket::INET ();
24
use Getopt::Long;
24
use Getopt::Long qw( GetOptions );
25
25
26
use C4::SIP::Sip qw( timestamp );
26
use C4::SIP::Sip ();
27
use C4::SIP::Sip qw( timestamp );
27
use C4::SIP::Sip ();
28
28
29
use constant { LANGUAGE => '001' };
29
use constant { LANGUAGE => '001' };
30
30
(-)a/misc/stage_file.pl (-4 / +3 lines)
Lines 23-38 use Modern::Perl; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
        eval { require "$FindBin::Bin/kohalib.pl" };
27
    eval { require "$FindBin::Bin/kohalib.pl" };
28
}
27
}
29
28
30
use Koha::Script;
29
use Koha::Script;
31
use C4::Context;
30
use C4::Context;
32
use C4::ImportBatch qw( sub RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates );
31
use C4::ImportBatch qw( sub RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates );
33
use C4::Matcher;
32
use C4::Matcher;
34
use C4::MarcModificationTemplates;
33
use C4::MarcModificationTemplates qw( GetModificationTemplates );
35
use Getopt::Long;
34
use Getopt::Long qw( GetOptions );
36
35
37
$| = 1;
36
$| = 1;
38
37
(-)a/misc/translator/tmpl_process3.pl (-3 / +2 lines)
Lines 4-10 Link Here
4
# Parts copyright 2003-2004 Jerome Vizcaino
4
# Parts copyright 2003-2004 Jerome Vizcaino
5
# Parts copyright 2004 Ambrose Li
5
# Parts copyright 2004 Ambrose Li
6
6
7
use FindBin;
8
use lib $FindBin::Bin;
7
use lib $FindBin::Bin;
9
8
10
=head1 NAME
9
=head1 NAME
Lines 16-23 using gettext-compatible translation files Link Here
16
15
17
use strict;
16
use strict;
18
#use warnings; FIXME - Bug 2505
17
#use warnings; FIXME - Bug 2505
19
use File::Basename;
18
use File::Basename qw( fileparse );
20
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
21
use Locale::PO;
20
use Locale::PO;
22
use File::Temp qw( :POSIX );
21
use File::Temp qw( :POSIX );
23
use TmplTokenizer;
22
use TmplTokenizer;
(-)a/misc/translator/xgettext.pl (-3 / +2 lines)
Lines 21-33 xgettext.pl - xgettext(1)-like interface for .tt strings extraction Link Here
21
21
22
=cut
22
=cut
23
23
24
use FindBin;
25
use lib $FindBin::Bin;
24
use lib $FindBin::Bin;
26
25
27
use strict;
26
use strict;
28
use warnings;
27
use warnings;
29
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
30
use POSIX;
29
use POSIX qw( close exit localtime open printf time );
31
use Locale::PO;
30
use Locale::PO;
32
use TmplTokenizer;
31
use TmplTokenizer;
33
use VerboseWarnings;
32
use VerboseWarnings;
(-)a/misc/z3950_responder.pl (-3 / +2 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use File::Basename qw( fileparse );
23
use File::Basename;
24
use Getopt::Long qw(:config no_ignore_case);
23
use Getopt::Long qw(:config no_ignore_case);
25
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
26
25
27
use Koha::Config;
26
use Koha::Config;
28
use Koha::Z3950Responder;
27
use Koha::Z3950Responder;
(-)a/offline_circ/download.pl (-2 / +1 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use JSON;
22
use JSON qw( to_json );
23
use C4::Auth qw( checkauth );
23
use C4::Auth qw( checkauth );
24
use C4::Output;
24
use C4::Output;
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
27
26
28
my $query = CGI->new;
27
my $query = CGI->new;
29
checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
28
checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
(-)a/offline_circ/enqueue_koc.pl (-4 lines)
Lines 23-41 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Biblio;
29
use C4::Accounts;
27
use C4::Accounts;
30
use C4::Circulation qw( AddOfflineOperation );
28
use C4::Circulation qw( AddOfflineOperation );
31
use C4::Items qw( sub );
32
use C4::Members;
29
use C4::Members;
33
use C4::Stats;
30
use C4::Stats;
34
use Koha::Checkouts;
31
use Koha::Checkouts;
35
use Koha::UploadedFiles;
32
use Koha::UploadedFiles;
36
use Koha::Items;
33
use Koha::Items;
37
34
38
use Date::Calc qw( Add_Delta_Days Date_to_Days );
39
35
40
use constant DEBUG => 0;
36
use constant DEBUG => 0;
41
37
(-)a/offline_circ/list.pl (-2 lines)
Lines 23-33 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Circulation qw( GetOfflineOperations GetOfflineOperation );
27
use C4::Circulation qw( GetOfflineOperations GetOfflineOperation );
29
use C4::Members;
28
use C4::Members;
30
use C4::Biblio;
31
use Koha::Patrons;
29
use Koha::Patrons;
32
30
33
use Koha::Items;
31
use Koha::Items;
(-)a/offline_circ/process_koc.pl (-5 / +2 lines)
Lines 21-36 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Carp;
25
24
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
28
use C4::Koha;
29
use C4::Context;
27
use C4::Context;
30
use C4::Biblio;
31
use C4::Accounts;
28
use C4::Accounts;
32
use C4::Circulation qw( barcodedecode GetOpenIssue AddRenewal AddIssue MarkIssueReturned );
29
use C4::Circulation qw( barcodedecode GetOpenIssue AddRenewal AddIssue MarkIssueReturned );
33
use C4::Items qw( sub ModDateLastSeen );
30
use C4::Items qw( ModDateLastSeen );
34
use C4::Members;
31
use C4::Members;
35
use C4::Stats;
32
use C4::Stats;
36
use C4::BackgroundJob;
33
use C4::BackgroundJob;
Lines 39-45 use Koha::Account; Link Here
39
use Koha::Checkouts;
36
use Koha::Checkouts;
40
use Koha::Patrons;
37
use Koha::Patrons;
41
38
42
use Date::Calc qw( Add_Delta_Days Date_to_Days );
39
use Date::Calc qw( Date_to_Days );
43
40
44
use constant DEBUG => 0;
41
use constant DEBUG => 0;
45
42
(-)a/offline_circ/service.pl (-1 / +1 lines)
Lines 23-29 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( check_api_auth check_cookie_auth );
24
use C4::Auth qw( check_api_auth check_cookie_auth );
25
use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
25
use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
use DateTime::TimeZone;
27
use DateTime::TimeZone;
28
28
29
my $cgi = CGI->new;
29
my $cgi = CGI->new;
(-)a/opac/clubs/clubs-tab.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/clubs/enroll.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/errors/400.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/401.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/402.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/403.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/404.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/500.pl (-1 / +1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( output_with_http_headers );
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/external/overdrive/auth.pl (-3 / +2 lines)
Lines 20-28 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use URI;
23
use URI ();
24
use URI::Escape;
24
use URI::Escape qw( uri_escape );
25
use C4::Auth qw(checkauth);
26
use Koha::Logger;
25
use Koha::Logger;
27
use Koha::ExternalContent::OverDrive;
26
use Koha::ExternalContent::OverDrive;
28
27
(-)a/opac/ilsdi.pl (-3 / +3 lines)
Lines 24-33 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
26
27
use List::MoreUtils qw(any);
27
use List::MoreUtils qw( any );
28
use XML::Simple;
28
use XML::Simple qw( XMLout );
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use Net::Netmask;
30
use Net::Netmask ();
31
31
32
=head1 DLF ILS-DI for Koha
32
=head1 DLF ILS-DI for Koha
33
33
(-)a/opac/opac-ISBDdetail.pl (-3 / +13 lines)
Lines 45-56 use C4::Auth qw( get_template_and_user ); Link Here
45
use C4::Context;
45
use C4::Context;
46
use C4::Output qw( parametrized_url output_html_with_http_headers );
46
use C4::Output qw( parametrized_url output_html_with_http_headers );
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use C4::Biblio qw( TransformMarcToKoha GetISBDView CountItemsIssued GetMarcControlnumber GetMarcISSN );
48
use C4::Biblio qw(
49
use C4::Items qw( sub );
49
    CountItemsIssued
50
    GetISBDView
51
    GetMarcControlnumber
52
    GetMarcISSN
53
    TransformMarcToKoha
54
);
50
use C4::Reserves;
55
use C4::Reserves;
51
use C4::Acquisition;
56
use C4::Acquisition;
52
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
57
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
53
use C4::Koha qw( GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN );
58
use C4::Koha qw(
59
    GetNormalizedEAN
60
    GetNormalizedISBN
61
    GetNormalizedOCLCNumber
62
    GetNormalizedUPC
63
);
54
use Koha::CirculationRules;
64
use Koha::CirculationRules;
55
use Koha::ItemTypes;
65
use Koha::ItemTypes;
56
use Koha::Patrons;
66
use Koha::Patrons;
(-)a/opac/opac-MARCdetail.pl (-6 / +13 lines)
Lines 49-69 use C4::Auth qw( get_template_and_user ); Link Here
49
use C4::Context;
49
use C4::Context;
50
use C4::Output qw( parametrized_url output_html_with_http_headers );
50
use C4::Output qw( parametrized_url output_html_with_http_headers );
51
use CGI qw ( -utf8 );
51
use CGI qw ( -utf8 );
52
use MARC::Record;
52
use C4::Biblio qw(
53
use C4::Biblio qw( GetMarcBiblio GetMarcStructure GetMarcFromKohaField CountItemsIssued GetAuthorisedValueDesc TransformMarcToKoha GetMarcControlnumber GetMarcISSN );
53
    CountItemsIssued
54
use C4::Items qw( sub );
54
    GetAuthorisedValueDesc
55
    GetMarcBiblio
56
    GetMarcControlnumber
57
    GetMarcFromKohaField
58
    GetMarcISSN
59
    GetMarcStructure
60
    TransformMarcToKoha
61
);
55
use C4::Reserves;
62
use C4::Reserves;
56
use C4::Members;
63
use C4::Members;
57
use C4::Acquisition;
64
use C4::Acquisition;
58
use C4::Koha qw( display_marc_indicators GetNormalizedISBN );
65
use C4::Koha qw( GetNormalizedISBN );
59
use List::MoreUtils qw( any uniq );
66
use List::MoreUtils qw( uniq );
60
use Koha::Biblios;
67
use Koha::Biblios;
61
use Koha::CirculationRules;
68
use Koha::CirculationRules;
62
use Koha::Items;
69
use Koha::Items;
63
use Koha::ItemTypes;
70
use Koha::ItemTypes;
64
use Koha::Patrons;
71
use Koha::Patrons;
65
use Koha::RecordProcessor;
72
use Koha::RecordProcessor;
66
use Koha::DateUtils;
73
use Koha::DateUtils qw( output_pref );
67
74
68
my $query = CGI->new();
75
my $query = CGI->new();
69
76
(-)a/opac/opac-account-pay-return.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
23
24
use C4::Auth qw( checkauth );
24
use C4::Auth qw( checkauth );
25
use Koha::Plugins::Handler;
25
use Koha::Plugins::Handler;
(-)a/opac/opac-account-pay.pl (-4 / +1 lines)
Lines 21-30 use utf8; Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI;
24
use CGI ();
25
use HTTP::Request::Common;
26
use LWP::UserAgent;
27
use URI;
28
25
29
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
30
use C4::Output;
27
use C4::Output;
(-)a/opac/opac-addbybiblionumber.pl (-1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Biblio;
25
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
26
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
27
26
(-)a/opac/opac-alert-subscribe.pl (-2 lines)
Lines 23-30 use CGI qw ( -utf8 ); Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
27
use C4::Letters;
28
use C4::Serials qw( GetSubscription );
26
use C4::Serials qw( GetSubscription );
29
27
30
28
(-)a/opac/opac-authorities-home.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use URI::Escape;
24
use URI::Escape qw( uri_escape_utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
26
27
use C4::Context;
27
use C4::Context;
(-)a/opac/opac-authoritiesdetail.pl (-2 / +1 lines)
Lines 44-51 use C4::Biblio qw( GetMarcUrls ); Link Here
44
use C4::Context;
44
use C4::Context;
45
use C4::Output qw( output_html_with_http_headers );
45
use C4::Output qw( output_html_with_http_headers );
46
use CGI qw ( -utf8 );
46
use CGI qw ( -utf8 );
47
use MARC::Record;
47
use C4::Koha ();
48
use C4::Koha qw( display_marc_indicators );
49
48
50
use Koha::Authorities;
49
use Koha::Authorities;
51
use Koha::Authority::Types;
50
use Koha::Authority::Types;
(-)a/opac/opac-basket.pl (-2 / +10 lines)
Lines 20-27 use Modern::Perl; Link Here
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Koha;
22
use C4::Koha;
23
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetFrameworkCode GetMarcAuthors GetMarcSubjects GetMarcSeries GetMarcUrls );
23
use C4::Biblio qw(
24
use C4::Items qw( sub GetItemsInfo GetHiddenItemnumbers );
24
    GetBiblioData
25
    GetFrameworkCode
26
    GetMarcAuthors
27
    GetMarcBiblio
28
    GetMarcSeries
29
    GetMarcSubjects
30
    GetMarcUrls
31
);
32
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
25
use C4::Circulation qw( GetTransfers );
33
use C4::Circulation qw( GetTransfers );
26
use C4::Auth qw( get_template_and_user );
34
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
35
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-browse.pl (-1 / +1 lines)
Lines 31-37 use Koha::SearchEngine::Elasticsearch::Browse; Link Here
31
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
31
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
32
use Koha::SearchEngine::Elasticsearch::Search;
32
use Koha::SearchEngine::Elasticsearch::Search;
33
33
34
use JSON;
34
use JSON qw( to_json );
35
use Unicode::Collate;
35
use Unicode::Collate;
36
36
37
my $query = CGI->new;
37
my $query = CGI->new;
(-)a/opac/opac-browser.pl (-1 lines)
Lines 30-36 use C4::Auth qw( get_template_and_user ); Link Here
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Biblio;
34
33
35
my $query = CGI->new;
34
my $query = CGI->new;
36
35
(-)a/opac/opac-course-details.pl (-1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
27
29
use C4::CourseReserves qw( GetCourse GetCourseReserve GetCourseReserves );
28
use C4::CourseReserves qw( GetCourse GetCourseReserve GetCourseReserves );
30
29
(-)a/opac/opac-detail.pl (-12 / +32 lines)
Lines 25-51 use Modern::Perl; Link Here
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Acquisition qw( SearchOrders );
26
use C4::Acquisition qw( SearchOrders );
27
use C4::Auth qw( get_template_and_user get_session );
27
use C4::Auth qw( get_template_and_user get_session );
28
use C4::Koha qw( GetNormalizedEAN getitemtypeimagelocation GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN );
28
use C4::Koha qw(
29
    getitemtypeimagelocation
30
    GetNormalizedEAN
31
    GetNormalizedISBN
32
    GetNormalizedOCLCNumber
33
    GetNormalizedUPC
34
);
29
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
35
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
30
use C4::Output qw( parametrized_url output_html_with_http_headers );
36
use C4::Output qw( parametrized_url output_html_with_http_headers );
31
use C4::Biblio qw( GetMarcBiblio GetBiblioData CountItemsIssued GetMarcISBN GetMarcAuthors GetMarcSubjects GetMarcSeries GetMarcUrls GetMarcControlnumber GetMarcISSN );
37
use C4::Biblio qw(
32
use C4::Items qw( GetItemsInfo GetHiddenItemnumbers sub );
38
    CountItemsIssued
39
    GetBiblioData
40
    GetMarcAuthors
41
    GetMarcBiblio
42
    GetMarcControlnumber
43
    GetMarcISBN
44
    GetMarcISSN
45
    GetMarcSeries
46
    GetMarcSubjects
47
    GetMarcUrls
48
);
49
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
33
use C4::Circulation qw( GetTransfers );
50
use C4::Circulation qw( GetTransfers );
34
use C4::Tags qw( get_tags get_tag );
51
use C4::Tags qw( get_tags );
35
use C4::XISBN qw( get_xisbns );
52
use C4::XISBN qw( get_xisbns );
36
use C4::External::Amazon;
53
use C4::External::Amazon qw( get_amazon_tld );
37
use C4::External::BakerTaylor qw( image_url link_url );
54
use C4::External::BakerTaylor qw( image_url link_url );
38
use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
55
use C4::External::Syndetics qw(
56
    get_syndetics_anotes
57
    get_syndetics_excerpt
58
    get_syndetics_index
59
    get_syndetics_reviews
60
    get_syndetics_summary
61
    get_syndetics_toc
62
);
39
use C4::Members;
63
use C4::Members;
40
use C4::XSLT;
64
use C4::XSLT;
41
use C4::ShelfBrowser qw( GetNearbyItems );
65
use C4::ShelfBrowser qw( GetNearbyItems );
42
use C4::Reserves qw( GetReserveStatus );
66
use C4::Reserves qw( GetReserveStatus );
43
use C4::Charset qw( SetUTF8Flag );
67
use C4::Charset qw( SetUTF8Flag );
44
use C4::Letters;
45
use MARC::Record;
46
use MARC::Field;
68
use MARC::Field;
47
use List::MoreUtils qw/any none/;
69
use List::MoreUtils qw( any );
48
use Koha::DateUtils;
49
use C4::HTML5Media;
70
use C4::HTML5Media;
50
use C4::CourseReserves qw( GetItemCourseReservesInfo );
71
use C4::CourseReserves qw( GetItemCourseReservesInfo );
51
72
Lines 63-69 use Koha::Ratings; Link Here
63
use Koha::Reviews;
84
use Koha::Reviews;
64
use Koha::SearchEngine::Search;
85
use Koha::SearchEngine::Search;
65
86
66
use Try::Tiny;
67
87
68
my $query = CGI->new();
88
my $query = CGI->new();
69
89
Lines 228-234 my $session = get_session($query->cookie("CGISESSID")); Link Here
228
my %paging = (previous => {}, next => {});
248
my %paging = (previous => {}, next => {});
229
if ($session->param('busc')) {
249
if ($session->param('busc')) {
230
    use C4::Search;
250
    use C4::Search;
231
    use URI::Escape;
251
    use URI::Escape qw( uri_escape_utf8 uri_unescape );
232
252
233
    # Rebuild the string to store on session
253
    # Rebuild the string to store on session
234
    # param value is URI encoded and params separator is HTML encode (&amp;)
254
    # param value is URI encoded and params separator is HTML encode (&amp;)
(-)a/opac/opac-discharge.pl (-3 / +1 lines)
Lines 18-33 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( carp );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw( -utf8 );
24
use CGI qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Log;
28
use Koha::Patrons;
27
use Koha::Patrons;
29
use Koha::Patron::Discharge;
28
use Koha::Patron::Discharge;
30
use Koha::DateUtils;
31
29
32
my $input = CGI->new;
30
my $input = CGI->new;
33
31
(-)a/opac/opac-downloadcart.pl (-4 / +3 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode qw( encode );
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode GetISBDView );
26
use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
27
use C4::Items;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Record;
28
use C4::Record;
30
use C4::Ris;
29
use C4::Ris qw( marc2ris );
31
use Koha::CsvProfiles;
30
use Koha::CsvProfiles;
32
use Koha::RecordProcessor;
31
use Koha::RecordProcessor;
33
32
(-)a/opac/opac-downloadshelf.pl (-4 / +2 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
24
23
25
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode GetISBDView );
25
use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
27
use C4::Items;
28
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
29
use C4::Record;
27
use C4::Record;
30
use C4::Ris;
28
use C4::Ris qw( marc2ris );
31
use Koha::CsvProfiles;
29
use Koha::CsvProfiles;
32
use Koha::RecordProcessor;
30
use Koha::RecordProcessor;
33
use Koha::Virtualshelves;
31
use Koha::Virtualshelves;
(-)a/opac/opac-export.pl (-2 / +7 lines)
Lines 22-31 use Modern::Perl; Link Here
22
use C4::Record;
22
use C4::Record;
23
use C4::Auth;
23
use C4::Auth;
24
use C4::Output;
24
use C4::Output;
25
use C4::Biblio qw( GetMarcBiblio GetMarcControlnumber GetFrameworkCode GetISBDView );
25
use C4::Biblio qw(
26
    GetFrameworkCode
27
    GetISBDView
28
    GetMarcBiblio
29
    GetMarcControlnumber
30
);
26
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
27
use C4::Auth;
32
use C4::Auth;
28
use C4::Ris;
33
use C4::Ris qw( marc2ris );
29
use Koha::RecordProcessor;
34
use Koha::RecordProcessor;
30
35
31
my $query = CGI->new;
36
my $query = CGI->new;
(-)a/opac/opac-ics.pl (-3 / +2 lines)
Lines 27-39 use Data::ICal::Entry::Event; Link Here
27
use DateTime;
27
use DateTime;
28
use DateTime::Format::ICal;
28
use DateTime::Format::ICal;
29
use DateTime::Event::ICal;
29
use DateTime::Event::ICal;
30
use URI;
30
use URI ();
31
31
32
use C4::Auth qw( get_template_and_user );
32
use C4::Auth qw( get_template_and_user );
33
use C4::Koha;
34
use C4::Circulation;
33
use C4::Circulation;
35
use C4::Members;
34
use C4::Members;
36
use Koha::DateUtils;
35
use Koha::DateUtils qw( dt_from_string );
37
36
38
my $query = CGI->new;
37
my $query = CGI->new;
39
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
38
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-idref.pl (-5 / +4 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
use LWP::UserAgent;
23
use LWP::UserAgent ();
24
use HTTP::Request::Common;
24
use JSON qw( from_json );
25
use JSON;
25
use Encode ();
26
use Encode;
27
26
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
28
use C4::Context;
(-)a/opac/opac-illrequests.pl (-1 lines)
Lines 23-29 use JSON qw( encode_json ); Link Here
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
28
27
29
use Koha::Illrequest::Config;
28
use Koha::Illrequest::Config;
(-)a/opac/opac-imageviewer.pl (-1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
25
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
26
25
27
use Koha::Biblios;
26
use Koha::Biblios;
(-)a/opac/opac-issue-note.pl (-3 / +2 lines)
Lines 25-34 use C4::Context; Link Here
25
use C4::Scrubber;
25
use C4::Scrubber;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio;
28
use C4::Letters ();
29
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
30
use Koha::Checkouts;
29
use Koha::Checkouts;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
32
use Koha::Patrons;
31
use Koha::Patrons;
33
32
34
my $query = CGI->new;
33
my $query = CGI->new;
(-)a/opac/opac-main.pl (-2 / +1 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::NewsChannels;    # GetNewsToDisplay
25
use C4::NewsChannels qw( GetNewsToDisplay );    # GetNewsToDisplay
26
use C4::Languages qw(getTranslatedLanguages accept_language);
27
use Koha::Quotes;
26
use Koha::Quotes;
28
use C4::Members;
27
use C4::Members;
29
use C4::Overdues qw( checkoverdues );
28
use C4::Overdues qw( checkoverdues );
(-)a/opac/opac-memberentry.pl (-3 / +3 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Digest::MD5 qw( md5_base64 md5_hex );
21
use Digest::MD5 qw( md5_base64 md5_hex );
22
use JSON;
22
use JSON qw( to_json );
23
use List::MoreUtils qw( any each_array uniq );
23
use List::MoreUtils qw( any each_array uniq );
24
use String::Random qw( random_string );
24
use String::Random qw( random_string );
25
25
Lines 28-41 use C4::Output qw( output_html_with_http_headers ); Link Here
28
use C4::Context;
28
use C4::Context;
29
use C4::Members qw( get_cardnumber_length checkcardnumber );
29
use C4::Members qw( get_cardnumber_length checkcardnumber );
30
use C4::Form::MessagingPreferences;
30
use C4::Form::MessagingPreferences;
31
use Koha::AuthUtils qw( generate_password is_password_valid );
31
use Koha::AuthUtils ();
32
use Koha::Patrons;
32
use Koha::Patrons;
33
use Koha::Patron::Consent;
33
use Koha::Patron::Consent;
34
use Koha::Patron::Modification;
34
use Koha::Patron::Modification;
35
use Koha::Patron::Modifications;
35
use Koha::Patron::Modifications;
36
use C4::Scrubber;
36
use C4::Scrubber;
37
use Email::Valid;
37
use Email::Valid;
38
use Koha::DateUtils;
38
use Koha::DateUtils qw( dt_from_string output_pref );
39
use Koha::Libraries;
39
use Koha::Libraries;
40
use Koha::Patron::Attribute::Types;
40
use Koha::Patron::Attribute::Types;
41
use Koha::Patron::Attributes;
41
use Koha::Patron::Attributes;
(-)a/opac/opac-messaging.pl (-1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
27
use C4::Circulation;
26
use C4::Circulation;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Members;
28
use C4::Members;
(-)a/opac/opac-mymessages.pl (-2 / +1 lines)
Lines 23-30 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Letters ();
27
use C4::Letters qw( GetRSSMessages );
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
28
30
my $query = CGI->new();
29
my $query = CGI->new();
(-)a/opac/opac-news-rss.pl (-3 / +2 lines)
Lines 19-29 Link Here
19
19
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI;
22
use CGI ();
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::NewsChannels;    # GetNewsToDisplay
25
use C4::NewsChannels qw( GetNewsToDisplay );    # GetNewsToDisplay
26
use C4::Languages qw(getTranslatedLanguages accept_language);
27
26
28
my $input = CGI->new;
27
my $input = CGI->new;
29
my $dbh   = C4::Context->dbh;
28
my $dbh   = C4::Context->dbh;
(-)a/opac/opac-passwd.pl (-1 / +1 lines)
Lines 29-35 use C4::Members; Link Here
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
use Koha::Patrons;
30
use Koha::Patrons;
31
31
32
use Try::Tiny;
32
use Try::Tiny qw( catch try );
33
33
34
my $query = CGI->new;
34
my $query = CGI->new;
35
35
(-)a/opac/opac-password-recovery.pl (-7 / +11 lines)
Lines 1-19 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI;
4
use CGI ();
5
5
6
use C4::Auth qw( get_template_and_user );
6
use C4::Auth qw( get_template_and_user );
7
use C4::Koha;
8
use C4::Output qw( output_html_with_http_headers );
7
use C4::Output qw( output_html_with_http_headers );
9
use C4::Context;
8
use C4::Context;
10
use Koha::Patron::Password::Recovery
9
use Koha::Patron::Password::Recovery qw(
11
  qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery DeleteExpiredPasswordRecovery);
10
    CompletePasswordRecovery
11
    DeleteExpiredPasswordRecovery
12
    GetValidLinkInfo
13
    SendPasswordRecoveryEmail
14
    ValidateBorrowernumber
15
);
12
use Koha::Patrons;
16
use Koha::Patrons;
13
my $query = CGI->new;
17
my $query = CGI->new;
14
use HTML::Entities;
18
use HTML::Entities ();
15
use Try::Tiny;
19
use Try::Tiny qw( catch try );
16
use List::Util qw/any/;
20
use List::Util qw( any );
17
21
18
my ( $template, $dummy, $cookie ) = get_template_and_user(
22
my ( $template, $dummy, $cookie ) = get_template_and_user(
19
    {
23
    {
(-)a/opac/opac-patron-consent.pl (-1 / +1 lines)
Lines 22-28 use CGI qw/-utf8/; Link Here
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::DateUtils qw/dt_from_string/;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Patron::Consents;
26
use Koha::Patron::Consents;
27
use Koha::Patrons;
27
use Koha::Patrons;
28
28
(-)a/opac/opac-ratings-ajax.pl (-1 / +1 lines)
Lines 34-40 use C4::Output qw( is_ajax output_ajax_with_http_headers ); Link Here
34
34
35
use Koha::Ratings;
35
use Koha::Ratings;
36
36
37
use JSON;
37
use JSON ();
38
38
39
my $is_ajax = is_ajax();
39
my $is_ajax = is_ajax();
40
40
(-)a/opac/opac-readingrecord.pl (-4 / +7 lines)
Lines 21-33 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha qw( GetNormalizedISBN getitemtypeimagelocation GetNormalizedUPC );
24
use C4::Koha qw(
25
use C4::Biblio qw( GetXmlBiblio );
25
    getitemtypeimagelocation
26
    GetNormalizedISBN
27
    GetNormalizedUPC
28
);
29
use C4::Biblio ();
26
use C4::Circulation;
30
use C4::Circulation;
27
use C4::Members qw( GetAllIssues );
31
use C4::Members qw( GetAllIssues );
28
use C4::External::BakerTaylor qw( image_url link_url );
32
use C4::External::BakerTaylor qw( image_url link_url );
29
use Koha::DateUtils;
33
use MARC::Record ();
30
use MARC::Record;
31
34
32
use C4::Output qw( output_html_with_http_headers );
35
use C4::Output qw( output_html_with_http_headers );
33
use C4::Charset qw( StripNonXmlChars );
36
use C4::Charset qw( StripNonXmlChars );
(-)a/opac/opac-registration-verify.pl (-1 / +1 lines)
Lines 23-29 use C4::Auth qw( get_template_and_user ); Link Here
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Members;
24
use C4::Members;
25
use C4::Form::MessagingPreferences;
25
use C4::Form::MessagingPreferences;
26
use Koha::AuthUtils qw( generate_password );
26
use Koha::AuthUtils ();
27
use Koha::Patrons;
27
use Koha::Patrons;
28
use Koha::Patron::Consent;
28
use Koha::Patron::Consent;
29
use Koha::Patron::Modifications;
29
use Koha::Patron::Modifications;
(-)a/opac/opac-renew.pl (-2 lines)
Lines 27-37 use CGI qw ( -utf8 ); Link Here
27
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
27
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
29
use C4::Context;
30
use C4::Items;
31
use C4::Members;
30
use C4::Members;
32
use Koha::Items;
31
use Koha::Items;
33
use Koha::Patrons;
32
use Koha::Patrons;
34
use Date::Calc qw( Today Date_to_Days );
35
my $query = CGI->new;
33
my $query = CGI->new;
36
34
37
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
35
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-reportproblem.pl (-4 / +4 lines)
Lines 19-35 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
26
use C4::Letters ();
27
use Koha::ProblemReport;
27
use Koha::ProblemReport;
28
use Koha::Libraries;
28
use Koha::Libraries;
29
use Koha::Patrons;
29
use Koha::Patrons;
30
use Koha::Util::Navigation;
30
use Koha::Util::Navigation;
31
use URI::Escape;
31
use URI::Escape qw( uri_unescape );
32
use Encode;
32
use Encode ();
33
33
34
my $input = CGI->new;
34
my $input = CGI->new;
35
35
(-)a/opac/opac-reserve.pl (-6 / +5 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha qw( getitemtypeimagesrc getitemtypeimagelocation );
25
use C4::Koha qw( getitemtypeimagelocation getitemtypeimagesrc );
26
use C4::Circulation qw( GetBranchItemRule GetTransfers );
26
use C4::Circulation qw( GetBranchItemRule GetTransfers );
27
use C4::Reserves qw( CanItemBeReserved CanBookBeReserved AddReserve GetReservesControlBranch IsAvailableForItemLevelRequest );
27
use C4::Reserves qw( CanItemBeReserved CanBookBeReserved AddReserve GetReservesControlBranch IsAvailableForItemLevelRequest );
28
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetFrameworkCode );
28
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
29
use C4::Items qw( GetItemsInfo GetHostItemsInfo sub );
29
use C4::Items qw( GetHostItemsInfo GetItemsInfo );
30
use C4::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
use C4::Context;
31
use C4::Context;
32
use C4::Members;
32
use C4::Members;
Lines 34-48 use C4::Overdues; Link Here
34
34
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::CirculationRules;
38
use Koha::CirculationRules;
39
use Koha::Items;
39
use Koha::Items;
40
use Koha::ItemTypes;
40
use Koha::ItemTypes;
41
use Koha::Checkouts;
41
use Koha::Checkouts;
42
use Koha::Libraries;
42
use Koha::Libraries;
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use Date::Calc qw/Today Date_to_Days/;
44
use List::MoreUtils qw( uniq );
45
use List::MoreUtils qw/uniq/;
46
45
47
my $maxreserves = C4::Context->preference("maxreserves");
46
my $maxreserves = C4::Context->preference("maxreserves");
48
47
(-)a/opac/opac-restrictedpage.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/opac/opac-retrieve-file.pl (-2 / +1 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use Encode ();
22
use Encode;
23
22
24
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
24
use C4::Context;
(-)a/opac/opac-review.pl (-3 / +1 lines)
Lines 20-32 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Koha;
24
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
25
use C4::Biblio;
26
use C4::Scrubber;
24
use C4::Scrubber;
27
25
28
use Koha::Biblios;
26
use Koha::Biblios;
29
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Review;
28
use Koha::Review;
31
use Koha::Reviews;
29
use Koha::Reviews;
32
30
(-)a/opac/opac-search-history.pl (-4 lines)
Lines 23-34 use C4::Auth qw( get_template_and_user ); Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Log;
27
use C4::Items;
28
use C4::Search::History;
26
use C4::Search::History;
29
27
30
use URI::Escape;
31
use POSIX qw(strftime);
32
28
33
29
34
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/opac/opac-search.pl (-12 / +8 lines)
Lines 28-38 use Modern::Perl; Link Here
28
# to perform, etc.
28
# to perform, etc.
29
## load Koha modules
29
## load Koha modules
30
use C4::Context;
30
use C4::Context;
31
use List::MoreUtils q/any/;
31
use List::MoreUtils qw( any );
32
use Try::Tiny;
32
use Encode ();
33
use Encode;
34
33
35
use Data::Dumper; # TODO remove
36
34
37
use Koha::SearchEngine::Search;
35
use Koha::SearchEngine::Search;
38
use Koha::SearchEngine::QueryBuilder;
36
use Koha::SearchEngine::QueryBuilder;
Lines 45-58 $searcher = Koha::SearchEngine::Search->new({index => 'biblios'}); Link Here
45
43
46
use C4::Output qw( output_html_with_http_headers pagination_bar output_with_http_headers );
44
use C4::Output qw( output_html_with_http_headers pagination_bar output_with_http_headers );
47
use C4::Auth qw( get_template_and_user get_session );
45
use C4::Auth qw( get_template_and_user get_session );
48
use C4::Languages qw( getlanguage getLanguages );
46
use C4::Languages qw( getLanguages );
49
use C4::Search qw( searchResults );
47
use C4::Search qw( searchResults );
50
use C4::Search qw( searchResults );
48
use C4::Search qw( searchResults );
51
use C4::Biblio qw( GetXmlBiblio CountItemsIssued );
49
use C4::Biblio qw( CountItemsIssued );
52
use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorisedValues );
50
use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorisedValues );
53
use C4::Tags qw( get_tags get_tag );
51
use C4::Tags qw( get_tags );
54
use C4::SocialData;
52
use C4::SocialData;
55
use C4::External::OverDrive;
56
use C4::External::BakerTaylor qw( image_url link_url );
53
use C4::External::BakerTaylor qw( image_url link_url );
57
54
58
use Koha::CirculationRules;
55
use Koha::CirculationRules;
Lines 65-74 use Koha::Patrons; Link Here
65
use Koha::Plugins;
62
use Koha::Plugins;
66
use Koha::SearchFields;
63
use Koha::SearchFields;
67
64
68
use POSIX qw(ceil floor strftime);
65
use POSIX qw( strftime );
69
use URI::Escape;
66
use URI::Escape qw( uri_escape_utf8 uri_unescape );
70
use JSON qw/decode_json encode_json/;
67
use Business::ISBN ();
71
use Business::ISBN;
72
68
73
my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
69
my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
74
# create a new CGI object
70
# create a new CGI object
(-)a/opac/opac-sendbasket.pl (-6 / +11 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode ();
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetMarcAuthors GetMarcSubjects );
27
use C4::Biblio qw(
28
use C4::Items qw( sub GetItemsInfo );
28
    GetBiblioData
29
    GetMarcAuthors
30
    GetMarcBiblio
31
    GetMarcSubjects
32
);
33
use C4::Items qw( GetItemsInfo );
29
use C4::Auth qw( get_template_and_user );
34
use C4::Auth qw( get_template_and_user );
30
use C4::Output qw( output_html_with_http_headers );
35
use C4::Output qw( output_html_with_http_headers );
31
use C4::Members;
36
use C4::Members;
(-)a/opac/opac-sendshelf.pl (-5 / +12 lines)
Lines 20-32 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw( encode );
23
use Encode ();
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio qw( GetMarcBiblio GetFrameworkCode GetBiblioData GetMarcAuthors GetMarcSubjects GetMarcISBN );
28
use C4::Biblio qw(
29
use C4::Items qw( sub GetItemsInfo );
29
    GetBiblioData
30
    GetFrameworkCode
31
    GetMarcAuthors
32
    GetMarcBiblio
33
    GetMarcISBN
34
    GetMarcSubjects
35
);
36
use C4::Items qw( GetItemsInfo );
30
use C4::Output qw( output_html_with_http_headers );
37
use C4::Output qw( output_html_with_http_headers );
31
use C4::Members;
38
use C4::Members;
32
use Koha::Email;
39
use Koha::Email;
(-)a/opac/opac-serial-issues.pl (-2 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
26
use C4::Serials qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
25
use C4::Serials qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
27
use C4::Letters;
28
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
29
use C4::Context;
27
use C4::Context;
30
28
(-)a/opac/opac-shareshelf.pl (-2 / +1 lines)
Lines 29-36 use Email::Valid; Link Here
29
29
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
31
use C4::Context;
31
use C4::Context;
32
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
32
use C4::Letters ();
33
use C4::Members ();
34
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
35
34
36
use Koha::Patrons;
35
use Koha::Patrons;
(-)a/opac/opac-shelves.pl (-3 / +8 lines)
Lines 21-33 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetFrameworkCode );
24
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
25
use C4::External::BakerTaylor qw( image_url link_url );
25
use C4::External::BakerTaylor qw( image_url link_url );
26
use C4::Koha qw( getitemtypeimagelocation GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN );
26
use C4::Koha qw(
27
    GetNormalizedEAN
28
    GetNormalizedISBN
29
    GetNormalizedOCLCNumber
30
    GetNormalizedUPC
31
);
27
use C4::Items qw( GetItemsLocationInfo );
32
use C4::Items qw( GetItemsLocationInfo );
28
use C4::Members;
33
use C4::Members;
29
use C4::Output qw( pagination_bar output_with_http_headers );
34
use C4::Output qw( pagination_bar output_with_http_headers );
30
use C4::Tags qw( get_tags get_tag );
35
use C4::Tags qw( get_tags );
31
use C4::XSLT;
36
use C4::XSLT;
32
37
33
use Koha::Biblios;
38
use Koha::Biblios;
(-)a/opac/opac-showmarc.pl (-2 / +1 lines)
Lines 21-33 use Modern::Perl; Link Here
21
21
22
# standard or CPAN modules used
22
# standard or CPAN modules used
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Encode;
24
use Encode ();
25
25
26
# Koha modules used
26
# Koha modules used
27
use C4::Context;
27
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Biblio;
31
use C4::ImportBatch;
30
use C4::ImportBatch;
32
use C4::XSLT ();
31
use C4::XSLT ();
33
use C4::Templates;
32
use C4::Templates;
(-)a/opac/opac-showreviews.pl (-3 / +8 lines)
Lines 22-35 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha qw( GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN );
25
use C4::Koha qw(
26
    GetNormalizedEAN
27
    GetNormalizedISBN
28
    GetNormalizedOCLCNumber
29
    GetNormalizedUPC
30
);
26
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
27
use C4::Circulation;
32
use C4::Circulation;
28
use C4::Biblio qw( GetMarcBiblio );
33
use C4::Biblio qw( GetMarcBiblio );
29
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Patrons;
35
use Koha::Patrons;
31
use Koha::Reviews;
36
use Koha::Reviews;
32
use POSIX qw(ceil floor strftime);
37
use POSIX qw( ceil floor );
33
38
34
my $template_name;
39
my $template_name;
35
my $query = CGI->new;
40
my $query = CGI->new;
(-)a/opac/opac-suggestions.pl (-2 / +2 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Encode qw( encode );
22
use Encode ();
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Members;
24
use C4::Members;
25
use C4::Koha qw( GetAuthorisedValues );
25
use C4::Koha qw( GetAuthorisedValues );
Lines 33-39 use Koha::AuthorisedValues; Link Here
33
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patrons;
34
use Koha::Patrons;
35
35
36
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string output_pref );
37
37
38
my $input           = CGI->new;
38
my $input           = CGI->new;
39
my $op              = $input->param('op') || 'else';
39
my $op              = $input->param('op') || 'else';
(-)a/opac/opac-tags.pl (-3 / +9 lines)
Lines 40-50 use C4::Context; Link Here
40
use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
40
use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
41
use C4::Scrubber;
41
use C4::Scrubber;
42
use C4::Biblio qw( GetMarcBiblio );
42
use C4::Biblio qw( GetMarcBiblio );
43
use C4::Items qw( sub GetItemsInfo GetHiddenItemnumbers );
43
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
44
use C4::Tags qw( add_tag remove_tag get_tag_rows get_tag get_approval_rows stratify_tags );
44
use C4::Tags qw(
45
    add_tag
46
    get_approval_rows
47
    get_tag_rows
48
    remove_tag
49
    stratify_tags
50
);
45
use C4::XSLT;
51
use C4::XSLT;
46
52
47
use Data::Dumper;
53
use Data::Dumper qw( Dumper );
48
54
49
use Koha::Logger;
55
use Koha::Logger;
50
use Koha::Biblios;
56
use Koha::Biblios;
(-)a/opac/opac-tags_subject.pl (-1 lines)
Lines 30-36 use C4::Auth qw( get_template_and_user ); Link Here
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Biblio;
34
33
35
my $query = CGI->new;
34
my $query = CGI->new;
36
35
(-)a/opac/opac-topissues.pl (-3 lines)
Lines 24-35 use Modern::Perl; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Languages;
28
use C4::Search;
27
use C4::Search;
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
31
use C4::Circulation qw( GetTopIssues );
29
use C4::Circulation qw( GetTopIssues );
32
use Date::Manip;
33
30
34
=head1 NAME
31
=head1 NAME
35
32
(-)a/opac/opac-user.pl (-10 / +8 lines)
Lines 22-40 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha qw( getitemtypeimagelocation GetNormalizedISBN GetNormalizedUPC );
25
use C4::Koha qw(
26
    getitemtypeimagelocation
27
    GetNormalizedISBN
28
    GetNormalizedUPC
29
);
26
use C4::Circulation qw( CanBookBeRenewed GetRenewCount GetIssuingCharges GetSoonestRenewDate );
30
use C4::Circulation qw( CanBookBeRenewed GetRenewCount GetIssuingCharges GetSoonestRenewDate );
27
use C4::External::BakerTaylor qw( image_url link_url );
31
use C4::External::BakerTaylor qw( image_url link_url );
28
use C4::Reserves qw( GetReserveStatus );
32
use C4::Reserves qw( GetReserveStatus );
29
use C4::Members;
33
use C4::Members;
30
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
31
use C4::Biblio qw( GetMarcBiblio );
35
use C4::Biblio qw( GetMarcBiblio );
32
use C4::Items;
33
use C4::Letters;
34
use Koha::Account::Lines;
36
use Koha::Account::Lines;
35
use Koha::Biblios;
37
use Koha::Biblios;
36
use Koha::Libraries;
38
use Koha::Libraries;
37
use Koha::DateUtils;
39
use Koha::DateUtils qw( output_pref );
38
use Koha::Holds;
40
use Koha::Holds;
39
use Koha::Database;
41
use Koha::Database;
40
use Koha::ItemTypes;
42
use Koha::ItemTypes;
Lines 48-59 use Koha::Token; Link Here
48
50
49
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
51
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
50
52
51
use Scalar::Util qw(looks_like_number);
53
use Scalar::Util qw( looks_like_number );
52
use Date::Calc qw(
54
use Date::Calc qw( Date_to_Days Today );
53
  Today
54
  Add_Delta_Days
55
  Date_to_Days
56
);
57
55
58
my $query = CGI->new;
56
my $query = CGI->new;
59
57
(-)a/opac/sci/sci-main.pl (-1 / +1 lines)
Lines 25-31 use C4::Output qw( output_html_with_http_headers ); Link Here
25
use Koha::Items;
25
use Koha::Items;
26
26
27
use List::MoreUtils qw( uniq );
27
use List::MoreUtils qw( uniq );
28
use Try::Tiny;
28
use Try::Tiny qw( catch try );
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
31
31
(-)a/opac/sco/printslip.pl (-1 lines)
Lines 32-38 use C4::Context; Link Here
32
use C4::Auth qw( in_iprange get_session get_template_and_user );
32
use C4::Auth qw( in_iprange get_session get_template_and_user );
33
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Members qw( IssueSlip );
34
use C4::Members qw( IssueSlip );
35
use C4::Koha;
36
35
37
my $input = CGI->new;
36
my $input = CGI->new;
38
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
37
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
(-)a/opac/sco/sco-main.pl (-3 lines)
Lines 36-48 use Modern::Perl; Link Here
36
use CGI qw ( -utf8 );
36
use CGI qw ( -utf8 );
37
37
38
use C4::Auth qw( in_iprange get_template_and_user checkpw );
38
use C4::Auth qw( in_iprange get_template_and_user checkpw );
39
use C4::Koha;
40
use C4::Circulation qw( AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
39
use C4::Circulation qw( AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
41
use C4::Reserves;
40
use C4::Reserves;
42
use C4::Output qw( output_html_with_http_headers );
41
use C4::Output qw( output_html_with_http_headers );
43
use C4::Members;
42
use C4::Members;
44
use C4::Biblio;
45
use C4::Items;
46
use Koha::DateUtils qw( dt_from_string );
43
use Koha::DateUtils qw( dt_from_string );
47
use Koha::Acquisition::Currencies;
44
use Koha::Acquisition::Currencies;
48
use Koha::Items;
45
use Koha::Items;
(-)a/opac/tracklinks.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth qw( checkauth );
23
use C4::Auth qw( checkauth );
24
use C4::Biblio qw( GetMarcBiblio GetMarcUrls );
24
use C4::Biblio ();
25
use C4::Output qw( output_error );
25
use C4::Output qw( output_error );
26
use Koha::Items;
26
use Koha::Items;
27
use Koha::Linktracker;
27
use Koha::Linktracker;
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use List::MoreUtils qw(any);
29
use List::MoreUtils qw( any );
30
30
31
my $cgi = CGI->new;
31
my $cgi = CGI->new;
32
my $uri = $cgi->param('uri') || '';
32
my $uri = $cgi->param('uri') || '';
(-)a/patron_lists/add-modify.pl (-1 / +1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/delete.pl (-1 / +1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( DelPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/list.pl (-2 / +6 lines)
Lines 23-30 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw(
27
use List::MoreUtils qw/uniq/;
27
    AddPatronsToList
28
    DelPatronsFromList
29
    GetPatronLists
30
);
31
use List::MoreUtils qw( uniq );
28
32
29
my $cgi = CGI->new;
33
my $cgi = CGI->new;
30
34
(-)a/patron_lists/lists.pl (-1 / +1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( GetPatronLists );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/patrons.pl (-1 / +1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patroncards/create-pdf.pl (-7 / +7 lines)
Lines 20-35 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use Graphics::Magick;
23
use Graphics::Magick ();
24
use XML::Simple;
24
use XML::Simple qw( XMLin );
25
use POSIX qw(ceil);
25
use POSIX qw( ceil );
26
use Storable qw(dclone);
26
use Storable qw( dclone );
27
use autouse 'Data::Dumper' => qw(Dumper);
27
use autouse 'Data::Dumper' => qw(Dumper);
28
28
29
use C4::Context;
29
use C4::Context;
30
use C4::Creators;
30
use C4::Creators ();
31
use C4::Patroncards;
31
use C4::Patroncards ();
32
use Koha::List::Patron;
32
use Koha::List::Patron qw( GetPatronLists );
33
use Koha::Patrons;
33
use Koha::Patrons;
34
use Koha::Patron::Images;
34
use Koha::Patron::Images;
35
35
(-)a/patroncards/edit-batch.pl (-2 / +2 lines)
Lines 27-34 use autouse 'Data::Dumper' => qw(Dumper); Link Here
27
27
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Creators;
30
use C4::Creators qw( get_card_summary html_table );
31
use C4::Patroncards;
31
use C4::Patroncards ();
32
use Koha::Patrons;
32
use Koha::Patrons;
33
33
34
my $cgi = CGI->new;
34
my $cgi = CGI->new;
(-)a/patroncards/edit-layout.pl (-4 / +9 lines)
Lines 21-34 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Text::CSV_XS;
24
use XML::Simple qw( XMLin XMLout );
25
use XML::Simple;
26
use autouse 'Data::Dumper' => qw(Dumper);
25
use autouse 'Data::Dumper' => qw(Dumper);
27
26
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Creators;
29
use C4::Creators qw(
31
use C4::Patroncards;
30
    get_all_image_names
31
    get_barcode_types
32
    get_font_types
33
    get_text_justification_types
34
    get_unit_values
35
);
36
use C4::Patroncards ();
32
37
33
my $cgi = CGI->new;
38
my $cgi = CGI->new;
34
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/patroncards/edit-profile.pl (-1 / +1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators::Lib qw(get_all_templates get_unit_values);
27
use C4::Creators::Lib qw( get_all_templates get_unit_values );
28
use C4::Patroncards::Profile;
28
use C4::Patroncards::Profile;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/patroncards/edit-template.pl (-2 / +2 lines)
Lines 25-32 use autouse 'Data::Dumper' => qw(Dumper); Link Here
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw( get_all_profiles get_unit_values );
29
use C4::Patroncards;
29
use C4::Patroncards ();
30
30
31
my $cgi = CGI->new;
31
my $cgi = CGI->new;
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/patroncards/image-manage.pl (-4 / +3 lines)
Lines 3-16 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use Graphics::Magick;
6
use Graphics::Magick ();
7
use POSIX qw(ceil);
8
7
9
use C4::Context;
8
use C4::Context;
10
use C4::Auth qw( get_template_and_user );
9
use C4::Auth qw( get_template_and_user );
11
use C4::Output qw( output_html_with_http_headers );
10
use C4::Output qw( output_html_with_http_headers );
12
use C4::Creators;
11
use C4::Creators qw( html_table );
13
use C4::Patroncards;
12
use C4::Patroncards qw( get_image put_image rm_image );
14
13
15
my $cgi = CGI->new;
14
my $cgi = CGI->new;
16
15
(-)a/patroncards/manage.pl (-3 / +9 lines)
Lines 26-35 use autouse 'Data::Dumper' => qw(Dumper); Link Here
26
26
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Creators;
29
use C4::Creators qw(
30
use C4::Patroncards;
30
    get_all_layouts
31
    get_all_profiles
32
    get_all_templates
33
    get_batch_summary
34
    html_table
35
);
36
use C4::Patroncards ();
31
use C4::Labels;
37
use C4::Labels;
32
use Koha::List::Patron;
38
use Koha::List::Patron qw( GetPatronLists );
33
39
34
my $cgi = CGI->new;
40
my $cgi = CGI->new;
35
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/patroncards/print.pl (-2 / +1 lines)
Lines 24-31 use autouse 'Data::Dumper' => qw(Dumper); Link Here
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_layouts get_all_templates get_output_formats );
28
use C4::Patroncards;
29
28
30
my $cgi = CGI->new;
29
my $cgi = CGI->new;
31
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
30
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/plugins/plugins-home.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use JSON qw(from_json);
24
use JSON qw( from_json );
25
use LWP::Simple qw(get);
25
use LWP::Simple qw( get );
26
26
27
use Koha::Plugins;
27
use Koha::Plugins;
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
(-)a/plugins/plugins-uninstall.pl (-2 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Archive::Extract;
20
use Archive::Extract;
21
use File::Temp;
22
use File::Copy;
23
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
24
22
25
use C4::Context;
23
use C4::Context;
(-)a/plugins/plugins-upload.pl (-2 / +1 lines)
Lines 21-28 use Modern::Perl; Link Here
21
use Archive::Extract;
21
use Archive::Extract;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Mojo::UserAgent;
23
use Mojo::UserAgent;
24
use File::Copy;
24
use File::Temp ();
25
use File::Temp;
26
25
27
use C4::Context;
26
use C4::Context;
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
(-)a/pos/pay.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI ();
23
use JSON qw( from_json );
23
use JSON qw( from_json );
24
24
25
use C4::Auth qw( get_session get_template_and_user );
25
use C4::Auth qw( get_session get_template_and_user );
(-)a/pos/printreceipt.pl (-2 / +1 lines)
Lines 22-30 use Modern::Perl; Link Here
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Letters qw( getletter );
25
use C4::Letters ();
26
use Koha::Account::Lines;
26
use Koha::Account::Lines;
27
use Koha::DateUtils;
28
use Koha::Notice::Templates;
27
use Koha::Notice::Templates;
29
28
30
my $input = CGI->new;
29
my $input = CGI->new;
(-)a/pos/register.pl (-2 / +2 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
Lines 26-32 use C4::Context; Link Here
26
use Koha::Account::Lines;
26
use Koha::Account::Lines;
27
use Koha::Cash::Registers;
27
use Koha::Cash::Registers;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
30
31
my $input = CGI->new();
31
my $input = CGI->new();
32
32
(-)a/pos/registers.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
(-)a/reports/acquisitions_stats.pl (-2 / +2 lines)
Lines 26-34 use C4::Reports qw( GetDelimiterChoices ); Link Here
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Biblio qw( GetMarcSubfieldStructure GetMarcSubfieldStructureFromKohaField );
29
use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
30
use Koha::ItemTypes;
30
use Koha::ItemTypes;
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Libraries;
32
use Koha::Libraries;
33
33
34
=head1 NAME
34
=head1 NAME
(-)a/reports/bor_issues_top.pl (-3 / +2 lines)
Lines 23-34 use CGI qw ( -utf8 ); Link Here
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
27
use C4::Circulation;
26
use C4::Circulation;
28
use C4::Members;
27
use C4::Members;
29
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Reports qw( GetDelimiterChoices );
30
29
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::ItemTypes;
31
use Koha::ItemTypes;
33
use Koha::Patron::Categories;
32
use Koha::Patron::Categories;
34
33
Lines 286-292 sub calculate { Link Here
286
		$patrons{$id}->{oldcols}->{$col} = $rank;
285
		$patrons{$id}->{oldcols}->{$col} = $rank;
287
    }
286
    }
288
287
289
	use Data::Dumper;
288
	use Data::Dumper qw( Dumper );
290
289
291
	$strcalc =~ s/old_issues/issues/g;
290
	$strcalc =~ s/old_issues/issues/g;
292
    $dbcalc = $dbh->prepare($strcalc);
291
    $dbcalc = $dbh->prepare($strcalc);
(-)a/reports/borrowers_out.pl (-2 / +1 lines)
Lines 22-34 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
26
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Circulation;
26
use C4::Circulation;
28
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Reports qw( GetDelimiterChoices );
29
use C4::Members;
28
use C4::Members;
30
29
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
33
32
34
=head1 NAME
33
=head1 NAME
(-)a/reports/borrowers_stats.pl (-6 / +2 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use List::MoreUtils qw/uniq/;
23
22
24
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
24
use C4::Context;
Lines 30-44 use C4::Reports qw( GetDelimiterChoices ); Link Here
30
use C4::Circulation;
29
use C4::Circulation;
31
30
32
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
33
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::Libraries;
33
use Koha::Libraries;
35
use Koha::Patron::Attribute::Types;
34
use Koha::Patron::Attribute::Types;
36
use Koha::Patron::Categories;
35
use Koha::Patron::Categories;
37
36
38
use Date::Calc qw(
37
use Date::Calc qw( Add_Delta_YM Today );
39
  Today
40
  Add_Delta_YM
41
  );
42
38
43
=head1 NAME
39
=head1 NAME
44
40
(-)a/reports/cash_register_stats.pl (-4 / +3 lines)
Lines 17-32 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Auth qw( get_template_and_user );
19
use C4::Auth qw( get_template_and_user );
20
use CGI;
20
use CGI ();
21
use C4::Context;
21
use C4::Context;
22
use C4::Reports qw( GetDelimiterChoices );
22
use C4::Reports qw( GetDelimiterChoices );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Koha;
25
use C4::Circulation;
24
use C4::Circulation;
26
use DateTime;
25
use DateTime;
27
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Text::CSV::Encoded;
27
use Text::CSV::Encoded;
29
use List::Util qw/any/;
28
use List::Util qw( any );
30
29
31
use Koha::Account::CreditTypes;
30
use Koha::Account::CreditTypes;
32
use Koha::Account::DebitTypes;
31
use Koha::Account::DebitTypes;
(-)a/reports/cat_issues_top.pl (-1 / +1 lines)
Lines 27-33 use C4::Koha qw( GetAuthorisedValues ); Link Here
27
use C4::Circulation;
27
use C4::Circulation;
28
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Reports qw( GetDelimiterChoices );
29
use C4::Members;
29
use C4::Members;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::ItemTypes;
31
use Koha::ItemTypes;
32
32
33
=head1 NAME
33
=head1 NAME
(-)a/reports/catalogue_out.pl (-1 / +1 lines)
Lines 24-30 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Context;
24
use C4::Context;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
# use Date::Manip;  # TODO: add not borrowed since date X criteria
26
# use Date::Manip;  # TODO: add not borrowed since date X criteria
27
use Data::Dumper;
27
use Data::Dumper qw( Dumper );
28
28
29
=head1 catalogue_out
29
=head1 catalogue_out
30
30
(-)a/reports/catalogue_stats.pl (-2 / +2 lines)
Lines 26-35 use C4::Output qw( output_html_with_http_headers ); Link Here
26
use C4::Koha qw( GetAuthorisedValues );
26
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Biblio qw( GetMarcSubfieldStructure GetMarcSubfieldStructureFromKohaField );
29
use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
30
30
31
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
32
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string );
33
use Koha::ItemTypes;
33
use Koha::ItemTypes;
34
34
35
=head1 NAME
35
=head1 NAME
(-)a/reports/dictionary.pl (-2 / +1 lines)
Lines 16-28 Link Here
16
#
16
#
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
20
use Modern::Perl;
19
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
20
use C4::Auth qw( get_template_and_user );
22
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
23
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
24
use C4::Reports::Guided qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas );
23
use C4::Reports::Guided qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas );
25
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string output_pref );
26
25
27
=head1 NAME
26
=head1 NAME
28
27
(-)a/reports/guided_reports.pl (-5 / +5 lines)
Lines 21-43 use Modern::Perl; Link Here
21
use CGI qw/-utf8/;
21
use CGI qw/-utf8/;
22
use Text::CSV::Encoded;
22
use Text::CSV::Encoded;
23
use Encode qw( decode );
23
use Encode qw( decode );
24
use URI::Escape;
24
use URI::Escape ();
25
use File::Temp;
25
use File::Temp ();
26
use C4::Reports::Guided qw( delete_report get_report_areas convert_sql update_sql get_saved_reports get_results ValidateSQLParameters format_results get_report_types get_columns get_from_dictionary get_criteria build_query save_report execute_query nb_rows get_report_groups );
26
use C4::Reports::Guided qw( delete_report get_report_areas convert_sql update_sql get_saved_reports get_results ValidateSQLParameters format_results get_report_types get_columns get_from_dictionary get_criteria build_query save_report execute_query nb_rows get_report_groups );
27
use Koha::Reports;
27
use Koha::Reports;
28
use C4::Auth qw( get_template_and_user get_session );
28
use C4::Auth qw( get_template_and_user get_session );
29
use C4::Output qw( pagination_bar output_html_with_http_headers );
29
use C4::Output qw( pagination_bar output_html_with_http_headers );
30
use C4::Context;
30
use C4::Context;
31
use Koha::Caches;
31
use Koha::Caches;
32
use C4::Log;
32
use C4::Log qw( logaction );
33
use Koha::DateUtils qw/dt_from_string output_pref/;
33
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::AuthorisedValue;
34
use Koha::AuthorisedValue;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::BiblioFrameworks;
36
use Koha::BiblioFrameworks;
37
use Koha::Libraries;
37
use Koha::Libraries;
38
use Koha::Patron::Categories;
38
use Koha::Patron::Categories;
39
use Koha::SharedContent;
39
use Koha::SharedContent;
40
use Koha::Util::OpenDocument;
40
use Koha::Util::OpenDocument qw( generate_ods );
41
41
42
=head1 NAME
42
=head1 NAME
43
43
(-)a/reports/issues_avg_stats.pl (-3 / +2 lines)
Lines 23-35 use C4::Auth qw( get_template_and_user ); Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Koha;
27
use C4::Circulation;
26
use C4::Circulation;
28
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Reports qw( GetDelimiterChoices );
29
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::ItemTypes;
29
use Koha::ItemTypes;
31
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
32
use Date::Calc qw(Delta_Days);
31
use Date::Calc qw( Delta_Days );
33
32
34
=head1 NAME
33
=head1 NAME
35
34
(-)a/reports/issues_stats.pl (-2 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Date::Manip;
24
23
25
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
25
use C4::Context;
Lines 31-37 use C4::Reports qw( GetDelimiterChoices ); Link Here
31
use C4::Members;
30
use C4::Members;
32
31
33
use Koha::AuthorisedValues;
32
use Koha::AuthorisedValues;
34
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string output_pref );
35
use Koha::ItemTypes;
34
use Koha::ItemTypes;
36
use Koha::Patron::Attribute::Types;
35
use Koha::Patron::Attribute::Types;
37
36
(-)a/reports/itemslost.pl (-4 / +1 lines)
Lines 28-42 This script displays lost items. Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use Text::CSV_XS;
31
use Text::CSV_XS ();
32
use C4::Auth qw( get_template_and_user );
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Biblio;
35
use C4::Items;
36
34
37
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
38
use Koha::CsvProfiles;
36
use Koha::CsvProfiles;
39
use Koha::DateUtils;
40
37
41
my $query = CGI->new;
38
my $query = CGI->new;
42
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/reports/orders_by_fund.pl (-3 / +1 lines)
Lines 31-41 use CGI qw( -utf8 ); Link Here
31
use C4::Auth qw( get_template_and_user );
31
use C4::Auth qw( get_template_and_user );
32
use C4::Output qw( output_html_with_http_headers );
32
use C4::Output qw( output_html_with_http_headers );
33
use C4::Budgets;
33
use C4::Budgets;
34
use C4::Biblio;
35
use C4::Reports;
36
use C4::Acquisition; #GetBasket()
34
use C4::Acquisition; #GetBasket()
37
use Koha::Biblios;
35
use Koha::Biblios;
38
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string output_pref );
39
37
40
my $query = CGI->new;
38
my $query = CGI->new;
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/reports/reserves_stats.pl (-2 / +2 lines)
Lines 28-38 use C4::Output qw( output_html_with_http_headers ); Link Here
28
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Reports qw( GetDelimiterChoices );
29
use C4::Members;
29
use C4::Members;
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
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
35
use List::MoreUtils qw/any/;
35
use List::MoreUtils qw( any );
36
36
37
=head1 NAME
37
=head1 NAME
38
38
(-)a/reports/serials_stats.pl (-1 lines)
Lines 22-28 use C4::Auth qw( get_template_and_user ); Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Koha;
26
use C4::Reports qw( GetDelimiterChoices );
25
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Serials qw( GetExpirationDate HasSubscriptionExpired );
26
use C4::Serials qw( GetExpirationDate HasSubscriptionExpired );
28
27
(-)a/reserve/placerequest.pl (-3 lines)
Lines 24-35 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Biblio;
28
use C4::Items;
29
use C4::Output;
27
use C4::Output;
30
use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
28
use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
31
use C4::Circulation;
29
use C4::Circulation;
32
use C4::Members;
33
use C4::Auth qw( checkauth );
30
use C4::Auth qw( checkauth );
34
31
35
use Koha::Items;
32
use Koha::Items;
(-)a/reserve/request.pl (-7 / +5 lines)
Lines 29-51 script to place reserves/requests Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use List::MoreUtils qw/uniq/;
32
use List::MoreUtils qw( uniq );
33
use Date::Calc qw/Date_to_Days/;
33
use Date::Calc qw( Date_to_Days );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Auth qw( get_template_and_user );
35
use C4::Auth qw( get_template_and_user );
36
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted GetReservesControlBranch CanItemBeReserved IsAvailableForItemLevelRequest );
36
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted GetReservesControlBranch CanItemBeReserved IsAvailableForItemLevelRequest );
37
use C4::Biblio;
37
use C4::Items qw( get_hostitemnumbers_of );
38
use C4::Items qw( get_hostitemnumbers_of sub );
39
use C4::Koha qw( getitemtypeimagelocation );
38
use C4::Koha qw( getitemtypeimagelocation );
40
use C4::Serials qw( CountSubscriptionFromBiblionumber );
39
use C4::Serials qw( CountSubscriptionFromBiblionumber );
41
use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule );
40
use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule );
42
use Koha::DateUtils;
41
use Koha::DateUtils qw( dt_from_string output_pref );
43
use C4::Utils::DataTables::Members;
42
use C4::Utils::DataTables::Members;
44
use C4::Members;
45
use C4::Search qw( enabled_staff_search_views );
43
use C4::Search qw( enabled_staff_search_views );
46
44
47
use Koha::Biblios;
45
use Koha::Biblios;
48
use Koha::DateUtils;
46
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::Checkouts;
47
use Koha::Checkouts;
50
use Koha::Holds;
48
use Koha::Holds;
51
use Koha::CirculationRules;
49
use Koha::CirculationRules;
(-)a/reviews/reviewswaiting.pl (-1 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output qw( pagination_bar output_html_with_http_headers );
22
use C4::Output qw( pagination_bar output_html_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use C4::Biblio;
25
use Koha::Biblios;
24
use Koha::Biblios;
26
use Koha::Patrons;
25
use Koha::Patrons;
27
use Koha::Reviews;
26
use Koha::Reviews;
(-)a/rotating_collections/addItems.pl (-1 lines)
Lines 22-28 use C4::Output qw( output_html_with_http_headers ); Link Here
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::RotatingCollections;
24
use C4::RotatingCollections;
25
use C4::Items;
26
25
27
use Koha::Items;
26
use Koha::Items;
28
27
(-)a/serials/acqui-search-result.pl (-2 / +1 lines)
Lines 42-52 acqui-search-result.pl Link Here
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use C4::Auth qw( get_template_and_user );
44
use C4::Auth qw( get_template_and_user );
45
use C4::Biblio;
46
use C4::Output qw( output_html_with_http_headers );
45
use C4::Output qw( output_html_with_http_headers );
47
use CGI qw ( -utf8 );
46
use CGI qw ( -utf8 );
48
use C4::Acquisition qw( SearchOrders );
47
use C4::Acquisition qw( SearchOrders );
49
use Koha::DateUtils;
48
use Koha::DateUtils qw( output_pref );
50
49
51
use Koha::Acquisition::Booksellers;
50
use Koha::Acquisition::Booksellers;
52
51
(-)a/serials/checkexpiration.pl (-1 / +1 lines)
Lines 48-54 use C4::Auth qw( get_template_and_user ); Link Here
48
use C4::Serials qw( SearchSubscriptions GetExpirationDate );
48
use C4::Serials qw( SearchSubscriptions GetExpirationDate );
49
use C4::Output qw( output_html_with_http_headers );
49
use C4::Output qw( output_html_with_http_headers );
50
use C4::Context;
50
use C4::Context;
51
use Koha::DateUtils;
51
use Koha::DateUtils qw( dt_from_string );
52
52
53
use DateTime;
53
use DateTime;
54
54
(-)a/serials/claims.pl (-2 / +1 lines)
Lines 24-31 use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClai Link Here
24
use C4::Acquisition;
24
use C4::Acquisition;
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use C4::Letters qw( SendAlerts GetLetters );
27
use C4::Letters qw( GetLetters SendAlerts );
28
use C4::Koha qw( GetAuthorisedValues );
29
28
30
use Koha::AdditionalFields;
29
use Koha::AdditionalFields;
31
use Koha::CsvProfiles;
30
use Koha::CsvProfiles;
(-)a/serials/create-numberpattern.pl (-2 / +4 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Numberpattern;
23
use C4::Serials::Numberpattern qw(
24
    AddSubscriptionNumberpattern
25
    ModSubscriptionNumberpattern
26
);
24
use C4::Auth qw( check_cookie_auth );
27
use C4::Auth qw( check_cookie_auth );
25
use URI::Escape;
26
28
27
my $input = CGI->new;
29
my $input = CGI->new;
28
30
(-)a/serials/lateissues-export.pl (-1 / +1 lines)
Lines 25-31 use C4::Context; Link Here
25
25
26
use Koha::CsvProfiles;
26
use Koha::CsvProfiles;
27
27
28
use Text::CSV_XS;
28
use Text::CSV_XS ();
29
29
30
my $query = CGI->new;
30
my $query = CGI->new;
31
my $supplierid = $query->param('supplierid');
31
my $supplierid = $query->param('supplierid');
(-)a/serials/routing-preview.pl (-4 / +2 lines)
Lines 27-37 use C4::Acquisition; Link Here
27
use C4::Reserves qw( AddReserve ModReserve );
27
use C4::Reserves qw( AddReserve ModReserve );
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Context;
29
use C4::Context;
30
use C4::Members;
30
use C4::Items qw( GetItemsInfo );
31
use C4::Biblio;
32
use C4::Items qw( sub GetItemsInfo );
33
use C4::Serials qw( delroutingmember getroutinglist GetSubscription GetSerials check_routing );
31
use C4::Serials qw( delroutingmember getroutinglist GetSubscription GetSerials check_routing );
34
use URI::Escape;
32
use URI::Escape ();
35
33
36
use Koha::Biblios;
34
use Koha::Biblios;
37
use Koha::Libraries;
35
use Koha::Libraries;
(-)a/serials/routing.pl (-2 / +1 lines)
Lines 34-44 use C4::Acquisition; Link Here
34
use C4::Output qw( output_and_exit output_html_with_http_headers );
34
use C4::Output qw( output_and_exit output_html_with_http_headers );
35
use C4::Context;
35
use C4::Context;
36
36
37
use C4::Members;
38
use C4::Serials qw( GetSubscription delroutingmember addroutingmember getroutinglist GetSerials GetLatestSerials check_routing );
37
use C4::Serials qw( GetSubscription delroutingmember addroutingmember getroutinglist GetSerials GetLatestSerials check_routing );
39
use Koha::Patrons;
38
use Koha::Patrons;
40
39
41
use URI::Escape;
40
use URI::Escape ();
42
41
43
my $query = CGI->new;
42
my $query = CGI->new;
44
my $subscriptionid = $query->param('subscriptionid');
43
my $subscriptionid = $query->param('subscriptionid');
(-)a/serials/serials-collection.pl (-3 / +1 lines)
Lines 22-37 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
26
use C4::Serials qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
25
use C4::Serials qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
27
use C4::Letters;
28
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
use C4::Output qw( output_and_exit output_html_with_http_headers );
29
use C4::Context;
27
use C4::Context;
30
use Koha::Serial::Items;
28
use Koha::Serial::Items;
31
29
32
use Koha::DateUtils qw( dt_from_string );
30
use Koha::DateUtils qw( dt_from_string );
33
31
34
use List::MoreUtils qw/uniq/;
32
use List::MoreUtils qw( uniq );
35
33
36
34
37
my $query = CGI->new;
35
my $query = CGI->new;
(-)a/serials/serials-edit.pl (-6 / +5 lines)
Lines 63-83 op can be : Link Here
63
63
64
use Modern::Perl;
64
use Modern::Perl;
65
use CGI qw ( -utf8 );
65
use CGI qw ( -utf8 );
66
use Encode qw( decode is_utf8 );
66
use Encode ();
67
use C4::Auth qw( get_template_and_user haspermission );
67
use C4::Auth qw( get_template_and_user haspermission );
68
use C4::Biblio qw( TransformHtmlToXml GetMarcFromKohaField );
68
use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToXml );
69
use C4::Items qw( sub PrepareItemrecordDisplay AddItemFromMarc ModItemFromMarc );
69
use C4::Items qw( AddItemFromMarc ModItemFromMarc PrepareItemrecordDisplay );
70
use C4::Koha;
71
use C4::Output qw( output_html_with_http_headers );
70
use C4::Output qw( output_html_with_http_headers );
72
use C4::Context;
71
use C4::Context;
73
use C4::Serials qw( GetSerials GetSerials2 GetSerialInformation HasSubscriptionExpired GetSubscription abouttoexpire NewIssue ModSerialStatus GetPreviousSerialid AddItem2Serial );
72
use C4::Serials qw( GetSerials GetSerials2 GetSerialInformation HasSubscriptionExpired GetSubscription abouttoexpire NewIssue ModSerialStatus GetPreviousSerialid AddItem2Serial );
74
use C4::Search qw( enabled_staff_search_views );
73
use C4::Search qw( enabled_staff_search_views );
75
74
76
use Koha::DateUtils;
75
use Koha::DateUtils qw( dt_from_string output_pref );
77
use Koha::Items;
76
use Koha::Items;
78
use Koha::Serial::Items;
77
use Koha::Serial::Items;
79
78
80
use List::MoreUtils qw/uniq/;
79
use List::MoreUtils qw( uniq );
81
80
82
my $query           = CGI->new();
81
my $query           = CGI->new();
83
my $dbh             = C4::Context->dbh;
82
my $dbh             = C4::Context->dbh;
(-)a/serials/serials-search.pl (-2 / +1 lines)
Lines 32-43 use Modern::Perl; Link Here
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Context;
34
use C4::Context;
35
use C4::Koha qw( GetAuthorisedValues );
36
use C4::Output qw( output_html_with_http_headers );
35
use C4::Output qw( output_html_with_http_headers );
37
use C4::Serials qw( CloseSubscription ReopenSubscription SearchSubscriptions check_routing );
36
use C4::Serials qw( CloseSubscription ReopenSubscription SearchSubscriptions check_routing );
38
use Koha::AdditionalFields;
37
use Koha::AdditionalFields;
39
38
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string );
41
use Koha::SharedContent;
40
use Koha::SharedContent;
42
41
43
my $query         = CGI->new;
42
my $query         = CGI->new;
(-)a/serials/showpredictionpattern.pl (-2 / +2 lines)
Lines 31-42 publication date, based on frequency and first publication date. Link Here
31
use Modern::Perl;
31
use Modern::Perl;
32
32
33
use CGI qw ( -utf8 );
33
use CGI qw ( -utf8 );
34
use Date::Calc qw(Today Day_of_Year Week_of_Year Day_of_Week Days_in_Year Delta_Days Add_Delta_Days Add_Delta_YM);
34
use Date::Calc qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days );
35
use C4::Auth qw( get_template_and_user );
35
use C4::Auth qw( get_template_and_user );
36
use C4::Output qw( output_html_with_http_headers );
36
use C4::Output qw( output_html_with_http_headers );
37
use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
37
use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
38
use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
38
use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
39
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
40
40
41
my $input = CGI->new;
41
my $input = CGI->new;
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-add.pl (-3 / +3 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Date::Calc qw(Today Day_of_Year Week_of_Year Add_Delta_Days Add_Delta_YM);
21
use Date::Calc qw( Add_Delta_Days Add_Delta_YM );
22
use C4::Koha qw( GetAuthorisedValues );
22
use C4::Koha qw( GetAuthorisedValues );
23
use C4::Biblio qw( GetMarcBiblio );
23
use C4::Biblio qw( GetMarcBiblio );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
Lines 31-39 use C4::Serials qw( GetSubscription GetNextExpected GetSerials GetSubscriptionLe Link Here
31
use C4::Letters qw( GetLetters );
31
use C4::Letters qw( GetLetters );
32
use Koha::AdditionalFields;
32
use Koha::AdditionalFields;
33
use Koha::Biblios;
33
use Koha::Biblios;
34
use Koha::DateUtils;
34
use Koha::DateUtils qw( output_pref );
35
use Koha::ItemTypes;
35
use Koha::ItemTypes;
36
use Carp;
36
use Carp qw( carp );
37
37
38
use Koha::Subscription::Numberpattern;
38
use Koha::Subscription::Numberpattern;
39
use Koha::Subscription::Frequency;
39
use Koha::Subscription::Frequency;
(-)a/serials/subscription-batchedit.pl (-1 / +1 lines)
Lines 27-33 use C4::Serials qw( can_edit_subscription ); Link Here
27
use Koha::Subscriptions;
27
use Koha::Subscriptions;
28
use Koha::Acquisition::Booksellers;
28
use Koha::Acquisition::Booksellers;
29
use Koha::AdditionalFields;
29
use Koha::AdditionalFields;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
31
31
32
my $cgi = CGI->new;
32
my $cgi = CGI->new;
33
33
(-)a/serials/subscription-detail.pl (-4 / +2 lines)
Lines 20-26 use CGI qw ( -utf8 ); Link Here
20
use C4::Acquisition;
20
use C4::Acquisition;
21
use C4::Auth qw( get_template_and_user checkauth );
21
use C4::Auth qw( get_template_and_user checkauth );
22
use C4::Budgets;
22
use C4::Budgets;
23
use C4::Koha;
24
use C4::Serials qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription );
23
use C4::Serials qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription );
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
24
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
use C4::Context;
25
use C4::Context;
Lines 28-39 use C4::Search qw( enabled_staff_search_views ); Link Here
28
27
29
use Koha::AdditionalFields;
28
use Koha::AdditionalFields;
30
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( output_pref );
32
use Koha::Acquisition::Bookseller;
31
use Koha::Acquisition::Bookseller;
33
use Koha::Subscriptions;
32
use Koha::Subscriptions;
34
33
35
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/;
34
use Carp qw( carp );
36
use Carp;
37
35
38
use Koha::SharedContent;
36
use Koha::SharedContent;
39
37
(-)a/serials/subscription-frequency.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Frequency;
23
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
24
use C4::Auth qw( check_cookie_auth );
24
use C4::Auth qw( check_cookie_auth );
25
use JSON qw( to_json );
25
use JSON qw( to_json );
26
26
(-)a/serials/subscription-history.pl (-2 / +1 lines)
Lines 33-42 use CGI qw ( -utf8 ); Link Here
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
35
36
use C4::Biblio;
37
use C4::Serials qw( ModSubscriptionHistory ModSubscription GetSubscriptionHistoryFromSubscriptionId GetSubscription );
36
use C4::Serials qw( ModSubscriptionHistory ModSubscription GetSubscriptionHistoryFromSubscriptionId GetSubscription );
38
use Koha::Biblios;
37
use Koha::Biblios;
39
use Koha::DateUtils;
38
use Koha::DateUtils qw( output_pref );
40
39
41
my $input = CGI->new;
40
my $input = CGI->new;
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
41
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-numberpattern.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Serials::Numberpattern;
22
use C4::Serials::Numberpattern qw( GetSubscriptionNumberpattern );
23
use C4::Auth qw( check_cookie_auth );
23
use C4::Auth qw( check_cookie_auth );
24
use JSON qw( to_json );
24
use JSON qw( to_json );
25
25
(-)a/serials/subscription-numberpatterns.pl (-2 / +10 lines)
Lines 32-39 use CGI qw ( -utf8 ); Link Here
32
32
33
use C4::Auth qw( get_template_and_user );
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Serials::Numberpattern;
35
use C4::Serials::Numberpattern qw(
36
use C4::Serials::Frequency;
36
    AddSubscriptionNumberpattern
37
    DelSubscriptionNumberpattern
38
    GetSubscriptionNumberpattern
39
    GetSubscriptionNumberpatternByName
40
    GetSubscriptionNumberpatterns
41
    GetSubscriptionsWithNumberpattern
42
    ModSubscriptionNumberpattern
43
);
44
use C4::Serials::Frequency qw( GetSubscriptionFrequencies );
37
45
38
my $input = CGI->new;
46
my $input = CGI->new;
39
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
47
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-renew.pl (-2 / +2 lines)
Lines 46-59 Id of the subscription this script has to renew Link Here
46
use Modern::Perl;
46
use Modern::Perl;
47
47
48
use CGI qw ( -utf8 );
48
use CGI qw ( -utf8 );
49
use Carp;
49
use Carp qw( carp );
50
use C4::Koha;
50
use C4::Koha;
51
use C4::Auth qw( get_template_and_user );
51
use C4::Auth qw( get_template_and_user );
52
use C4::Context;
52
use C4::Context;
53
use C4::Auth qw( get_template_and_user );
53
use C4::Auth qw( get_template_and_user );
54
use C4::Output qw( output_and_exit output_html_with_http_headers );
54
use C4::Output qw( output_and_exit output_html_with_http_headers );
55
use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription );
55
use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription );
56
use Koha::DateUtils;
56
use Koha::DateUtils qw( dt_from_string output_pref );
57
57
58
my $query = CGI->new;
58
my $query = CGI->new;
59
my $dbh   = C4::Context->dbh;
59
my $dbh   = C4::Context->dbh;
(-)a/suggestion/suggestion.pl (-1 / +1 lines)
Lines 33-39 use Koha::Acquisition::Currencies; Link Here
33
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patrons;
34
use Koha::Patrons;
35
35
36
use URI::Escape;
36
use URI::Escape qw( uri_escape );
37
37
38
sub Init{
38
sub Init{
39
    my $suggestion= shift @_;
39
    my $suggestion= shift @_;
(-)a/svc/cataloguing/automatic_linker.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI ();
22
use JSON;
22
use JSON qw( to_json );
23
use C4::Auth qw( check_cookie_auth );
23
use C4::Auth qw( check_cookie_auth );
24
use C4::Biblio qw( TransformHtmlToMarc BiblioAutoLink );
24
use C4::Biblio qw( BiblioAutoLink TransformHtmlToMarc );
25
use C4::Context;
25
use C4::Context;
26
26
27
my $input = CGI->new;
27
my $input = CGI->new;
(-)a/t/Koha/sleep.pl (-1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use Koha::Script;
5
use Koha::Script;
6
use Fcntl qw(:flock);
6
use Fcntl qw(:flock);
7
use Try::Tiny;
8
7
9
# # Lock execution
8
# # Lock execution
10
my $script = Koha::Script->new({ script => 'sleep.pl' });
9
my $script = Koha::Script->new({ script => 'sleep.pl' });
(-)a/t/Koha/wait.pl (-1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use Koha::Script;
5
use Koha::Script;
6
use Fcntl qw(:flock);
6
use Fcntl qw(:flock);
7
use Try::Tiny;
8
7
9
# # Lock execution
8
# # Lock execution
10
my $script = Koha::Script->new({ script => 'sleep.pl' });
9
my $script = Koha::Script->new({ script => 'sleep.pl' });
(-)a/t/db_dependent/zebra_config.pl (-5 / +5 lines)
Lines 2-12 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use File::Copy;
5
use File::Copy qw( copy );
6
use File::Path qw(make_path);
6
use File::Path qw( make_path );
7
use File::Find;
7
use File::Find qw( find );
8
use File::Basename;
8
use File::Basename qw( dirname );
9
use File::Spec;
9
use File::Spec ();
10
10
11
use C4::Context;
11
use C4::Context;
12
12
(-)a/tags/list.pl (-2 / +1 lines)
Lines 24-31 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Biblio qw( GetBiblioData );
24
use C4::Biblio qw( GetBiblioData );
25
use C4::Context;
25
use C4::Context;
26
use C4::Items qw( GetItemsInfo );
26
use C4::Items qw( GetItemsInfo );
27
use C4::Koha;
27
use C4::Tags qw( get_tag_rows get_tags remove_tag );
28
use C4::Tags qw( remove_tag get_tag_rows get_tag get_tags );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
29
31
my $needed_flags = { tools => 'moderate_tags'
30
my $needed_flags = { tools => 'moderate_tags'
(-)a/tags/review.pl (-5 / +11 lines)
Lines 20-35 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use Data::Dumper;
23
use Data::Dumper qw( Dumper );
24
use POSIX;
24
use POSIX qw( ceil exit );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
26
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
27
use URI::Escape;
27
use URI::Escape qw( uri_escape_utf8 );
28
use C4::Auth qw( check_cookie_auth get_template_and_user );
28
use C4::Auth qw( check_cookie_auth get_template_and_user );
29
use C4::Context;
29
use C4::Context;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
31
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
32
use C4::Tags qw( is_approved whitelist blacklist approval_counts get_approval_rows );
32
use C4::Tags qw(
33
    approval_counts
34
    blacklist
35
    get_approval_rows
36
    is_approved
37
    whitelist
38
);
33
39
34
my $script_name = "/cgi-bin/koha/tags/review.pl";
40
my $script_name = "/cgi-bin/koha/tags/review.pl";
35
my $needed_flags = { tools => 'moderate_tags' };    # FIXME: replace when more specific permission is created.
41
my $needed_flags = { tools => 'moderate_tags' };    # FIXME: replace when more specific permission is created.
(-)a/tools/access_files.pl (-5 / +4 lines)
Lines 24-36 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use CGI;
27
use CGI ();
28
use C4::Context;
28
use C4::Context;
29
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
30
use File::stat qw( stat );
31
use File::stat qw(stat);
31
use Digest::MD5 qw( md5_hex );
32
use Digest::MD5 qw(md5_hex);
32
use Encode qw( decode );
33
use Encode;
34
33
35
my $input = CGI->new;
34
my $input = CGI->new;
36
my $file_id = $input->param("id");
35
my $file_id = $input->param("id");
(-)a/tools/automatic_item_modification_by_age.pl (-3 / +2 lines)
Lines 31-42 This script allows a user to update the new status for items. Link Here
31
31
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI;
34
use CGI ();
35
use JSON qw( to_json from_json );
35
use JSON qw( to_json );
36
36
37
use C4::Auth qw( get_template_and_user );
37
use C4::Auth qw( get_template_and_user );
38
use C4::Context;
38
use C4::Context;
39
use C4::Items qw( sub );
40
use C4::Output qw( output_html_with_http_headers );
39
use C4::Output qw( output_html_with_http_headers );
41
use C4::Koha;
40
use C4::Koha;
42
41
(-)a/tools/background-job-progress.pl (-1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
# standard or CPAN modules used
22
# standard or CPAN modules used
23
use IO::File;
24
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
25
use CGI::Session;
24
use CGI::Session;
26
use C4::Context;
25
use C4::Context;
(-)a/tools/batchMod.pl (-6 / +13 lines)
Lines 20-45 Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Modern::Perl;
22
use Modern::Perl;
23
use Try::Tiny;
23
use Try::Tiny qw( catch try );
24
24
25
use C4::Auth qw( get_template_and_user haspermission );
25
use C4::Auth qw( get_template_and_user haspermission );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio qw( GetMarcStructure GetMarcFromKohaField TransformHtmlToXml DelBiblio IsMarcStructureInternal GetAuthorisedValueDesc );
27
use C4::Biblio qw(
28
use C4::Items qw( sub Item2Marc ModItemFromMarc GetItemsInfo );
28
    DelBiblio
29
    GetAuthorisedValueDesc
30
    GetMarcFromKohaField
31
    GetMarcStructure
32
    IsMarcStructureInternal
33
    TransformHtmlToXml
34
);
35
use C4::Items qw( GetItemsInfo Item2Marc ModItemFromMarc );
29
use C4::Circulation qw( LostItem IsItemIssued );
36
use C4::Circulation qw( LostItem IsItemIssued );
30
use C4::Context;
37
use C4::Context;
31
use C4::Koha;
38
use C4::Koha;
32
use C4::BackgroundJob;
39
use C4::BackgroundJob;
33
use C4::ClassSource qw( GetClassSources GetClassSource );
40
use C4::ClassSource qw( GetClassSources );
34
use C4::Members;
41
use C4::Members;
35
use MARC::File::XML;
42
use MARC::File::XML;
36
use List::MoreUtils qw/uniq/;
43
use List::MoreUtils qw( uniq );
37
44
38
use Koha::Database;
45
use Koha::Database;
39
use Koha::Exceptions::Exception;
46
use Koha::Exceptions::Exception;
40
use Koha::AuthorisedValues;
47
use Koha::AuthorisedValues;
41
use Koha::Biblios;
48
use Koha::Biblios;
42
use Koha::DateUtils;
49
use Koha::DateUtils qw( dt_from_string );
43
use Koha::Items;
50
use Koha::Items;
44
use Koha::ItemTypes;
51
use Koha::ItemTypes;
45
use Koha::Patrons;
52
use Koha::Patrons;
(-)a/tools/batch_delete_records.pl (-2 / +2 lines)
Lines 20-32 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI;
23
use CGI ();
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
25
26
use C4::Auth qw( get_template_and_user );
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use C4::Biblio qw( GetMarcBiblio CountItemsIssued DelBiblio );
29
use C4::Biblio qw( GetMarcBiblio );
30
use Koha::Virtualshelves;
30
use Koha::Virtualshelves;
31
31
32
use Koha::Authorities;
32
use Koha::Authorities;
(-)a/tools/batch_extend_due_dates.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI;
23
use CGI ();
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/tools/batch_record_modification.pl (-5 / +6 lines)
Lines 20-35 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI;
23
use CGI ();
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
use JSON qw( encode_json );
25
use Try::Tiny qw( catch try );
26
use Try::Tiny;
27
26
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
31
use C4::Biblio qw( GetMarcBiblio ModBiblio );
30
use C4::MarcModificationTemplates qw(
32
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates );
31
    GetModificationTemplateActions
32
    GetModificationTemplates
33
);
33
34
34
use Koha::Biblios;
35
use Koha::Biblios;
35
use Koha::BackgroundJob::BatchUpdateBiblio;
36
use Koha::BackgroundJob::BatchUpdateBiblio;
(-)a/tools/batch_records_ajax.pl (-2 / +1 lines)
Lines 32-41 the records from an import batch. Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use JSON qw/ to_json /;
35
use JSON qw( to_json );
36
36
37
use C4::Context;
37
use C4::Context;
38
use C4::Charset;
39
use C4::Auth qw( check_cookie_auth );
38
use C4::Auth qw( check_cookie_auth );
40
use C4::ImportBatch qw( GetImportBatch GetImportRecordsRange GetImportRecordMatches );
39
use C4::ImportBatch qw( GetImportBatch GetImportRecordsRange GetImportRecordMatches );
41
40
(-)a/tools/cleanborrowers.pl (-2 / +1 lines)
Lines 41-49 use C4::Circulation; # AnonymiseIssueHistory. Link Here
41
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::Patron::Categories;
42
use Koha::Patron::Categories;
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use Date::Calc qw/Today Add_Delta_YM/;
45
use Koha::Patrons;
44
use Koha::Patrons;
46
use Koha::List::Patron;
45
use Koha::List::Patron qw( GetPatronLists );
47
46
48
my $cgi = CGI->new;
47
my $cgi = CGI->new;
49
48
(-)a/tools/csv-profiles.pl (-2 / +1 lines)
Lines 35-47 This script allow the user to define a new profile for CSV export Link Here
35
=cut
35
=cut
36
36
37
use Modern::Perl;
37
use Modern::Perl;
38
use Encode;
38
use Encode ();
39
39
40
use C4::Auth qw( get_template_and_user );
40
use C4::Auth qw( get_template_and_user );
41
use C4::Context;
41
use C4::Context;
42
use C4::Output qw( output_html_with_http_headers );
42
use C4::Output qw( output_html_with_http_headers );
43
use CGI qw ( -utf8 );
43
use CGI qw ( -utf8 );
44
use C4::Koha;
45
use Koha::CsvProfiles;
44
use Koha::CsvProfiles;
46
45
47
my $input            = CGI->new;
46
my $input            = CGI->new;
(-)a/tools/exceptionHolidays.pl (-1 / +1 lines)
Lines 9-15 use C4::Output; Link Here
9
use DateTime;
9
use DateTime;
10
10
11
use C4::Calendar;
11
use C4::Calendar;
12
use Koha::DateUtils;
12
use Koha::DateUtils qw( dt_from_string );
13
13
14
my $input = CGI->new;
14
my $input = CGI->new;
15
my $dbh = C4::Context->dbh();
15
my $dbh = C4::Context->dbh();
(-)a/tools/export.pl (-2 / +2 lines)
Lines 19-25 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use MARC::File::XML;
21
use MARC::File::XML;
22
use List::MoreUtils qw(uniq);
22
use List::MoreUtils qw( uniq );
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
Lines 27-33 use Koha::Authority::Types; Link Here
27
use Koha::Biblioitems;
27
use Koha::Biblioitems;
28
use Koha::CsvProfiles;
28
use Koha::CsvProfiles;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Exporter::Record;
31
use Koha::Exporter::Record;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::Libraries;
33
use Koha::Libraries;
(-)a/tools/holidays.pl (-1 / +1 lines)
Lines 24-30 use C4::Auth qw( get_template_and_user ); Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use C4::Calendar;
26
use C4::Calendar;
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
30
(-)a/tools/import_borrowers.pl (-3 / +3 lines)
Lines 40-53 use C4::Auth qw( get_template_and_user ); Link Here
40
use C4::Output qw( output_and_exit output_html_with_http_headers );
40
use C4::Output qw( output_and_exit output_html_with_http_headers );
41
use C4::Templates;
41
use C4::Templates;
42
use Koha::Patrons;
42
use Koha::Patrons;
43
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string );
44
use Koha::Token;
44
use Koha::Token;
45
use Koha::Libraries;
45
use Koha::Libraries;
46
use Koha::Patron::Categories;
46
use Koha::Patron::Categories;
47
use Koha::Patron::Attribute::Types;
47
use Koha::Patron::Attribute::Types;
48
use Koha::List::Patron;
48
use Koha::List::Patron qw( AddPatronList AddPatronsToList );
49
49
50
use Koha::Patrons::Import;
50
use Koha::Patrons::Import ();
51
my $Import = Koha::Patrons::Import->new();
51
my $Import = Koha::Patrons::Import->new();
52
52
53
use Text::CSV;
53
use Text::CSV;
(-)a/tools/inventory.pl (-3 / +2 lines)
Lines 29-43 my $barcodelist = $input->param('barcodelist'); Link Here
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Biblio;
32
use C4::Items qw( GetItemsForInventory );
33
use C4::Items qw( GetItemsForInventory sub );
34
use C4::Koha qw( GetAuthorisedValues );
33
use C4::Koha qw( GetAuthorisedValues );
35
use C4::Circulation qw( AddReturn );
34
use C4::Circulation qw( AddReturn );
36
use C4::Reports::Guided qw( _get_column_defs );
35
use C4::Reports::Guided qw( _get_column_defs );
37
use C4::Charset qw( NormalizeString );
36
use C4::Charset qw( NormalizeString );
38
37
39
use Koha::Biblios;
38
use Koha::Biblios;
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
42
use Koha::BiblioFrameworks;
41
use Koha::BiblioFrameworks;
43
use Koha::ClassSources;
42
use Koha::ClassSources;
(-)a/tools/koha-news.pl (-4 / +9 lines)
Lines 25-37 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Koha;
29
use C4::Context;
28
use C4::Context;
30
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output qw( output_html_with_http_headers );
31
use C4::NewsChannels;
30
use C4::NewsChannels qw(
31
    add_opac_new
32
    del_opac_new
33
    get_opac_new
34
    get_opac_news
35
    upd_opac_new
36
);
32
use C4::Languages qw( getTranslatedLanguages );
37
use C4::Languages qw( getTranslatedLanguages );
33
use Date::Calc qw/Date_to_Days Today/;
38
use Date::Calc qw( Date_to_Days Today );
34
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
35
40
36
my $cgi = CGI->new;
41
my $cgi = CGI->new;
37
42
(-)a/tools/letter.pl (-2 / +2 lines)
Lines 45-52 use CGI qw ( -utf8 ); Link Here
45
use C4::Auth qw( get_template_and_user );
45
use C4::Auth qw( get_template_and_user );
46
use C4::Context;
46
use C4::Context;
47
use C4::Output qw( output_html_with_http_headers );
47
use C4::Output qw( output_html_with_http_headers );
48
use C4::Letters qw( GetLetterTemplates GetMessageTransportTypes GetMessage getletter );
48
use C4::Letters qw( GetMessageTransportTypes );
49
use C4::Log;
49
use C4::Log qw( logaction );
50
50
51
use Koha::Notice::Templates;
51
use Koha::Notice::Templates;
52
use Koha::Patron::Attribute::Types;
52
use Koha::Patron::Attribute::Types;
(-)a/tools/manage-marc-import.pl (-1 lines)
Lines 30-36 use C4::Koha; Link Here
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
31
use C4::Auth qw( get_template_and_user );
31
use C4::Auth qw( get_template_and_user );
32
use C4::Output qw( output_html_with_http_headers );
32
use C4::Output qw( output_html_with_http_headers );
33
use C4::Biblio;
34
use C4::ImportBatch qw( CleanBatch DeleteBatch sub GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords );
33
use C4::ImportBatch qw( CleanBatch DeleteBatch sub GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords );
35
use C4::Matcher;
34
use C4::Matcher;
36
use C4::BackgroundJob;
35
use C4::BackgroundJob;
(-)a/tools/marc_modification_templates.pl (-2 / +10 lines)
Lines 21-29 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
26
use C4::MarcModificationTemplates;
25
use C4::MarcModificationTemplates qw(
26
    AddModificationTemplate
27
    AddModificationTemplateAction
28
    DelModificationTemplate
29
    DelModificationTemplateAction
30
    GetModificationTemplateActions
31
    GetModificationTemplates
32
    ModModificationTemplateAction
33
    MoveModificationTemplateAction
34
);
27
35
28
my $cgi = CGI->new;
36
my $cgi = CGI->new;
29
37
(-)a/tools/modborrowers.pl (-3 / +2 lines)
Lines 31-42 use C4::Auth qw( get_template_and_user ); Link Here
31
use C4::Koha qw( GetAuthorisedValues );
31
use C4::Koha qw( GetAuthorisedValues );
32
use C4::Members;
32
use C4::Members;
33
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
34
use List::MoreUtils qw /any uniq/;
35
use Koha::DateUtils qw( dt_from_string );
34
use Koha::DateUtils qw( dt_from_string );
36
use Koha::List::Patron;
35
use Koha::List::Patron qw( GetPatronLists );
37
use Koha::Libraries;
36
use Koha::Libraries;
38
use Koha::Patron::Categories;
37
use Koha::Patron::Categories;
39
use Koha::Patron::Debarments;
38
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
40
use Koha::Patrons;
39
use Koha::Patrons;
41
40
42
my $input = CGI->new;
41
my $input = CGI->new;
(-)a/tools/newHolidays.pl (-1 / +1 lines)
Lines 26-32 use C4::Output; Link Here
26
26
27
use C4::Calendar;
27
use C4::Calendar;
28
use DateTime;
28
use DateTime;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
30
31
my $input               = CGI->new;
31
my $input               = CGI->new;
32
my $dbh                 = C4::Context->dbh();
32
my $dbh                 = C4::Context->dbh();
(-)a/tools/overduerules.pl (-2 / +1 lines)
Lines 22-29 use CGI qw ( -utf8 ); Link Here
22
use C4::Context;
22
use C4::Context;
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Letters ();
26
use C4::Letters qw( GetLetters GetLettersAvailableForALibrary GetMessageTransportTypes GetMessage );
27
use C4::Members;
26
use C4::Members;
28
use C4::Overdues qw( GetOverdueMessageTransportTypes );
27
use C4::Overdues qw( GetOverdueMessageTransportTypes );
29
use Koha::Libraries;
28
use Koha::Libraries;
(-)a/tools/picture-upload.pl (-3 / +2 lines)
Lines 21-30 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use File::Temp;
24
use File::Temp ();
25
use File::Copy;
26
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
27
use GD;
26
use GD ();
28
use C4::Context;
27
use C4::Context;
29
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
30
use C4::Output qw( output_and_exit output_html_with_http_headers );
29
use C4::Output qw( output_and_exit output_html_with_http_headers );
(-)a/tools/quotes-upload.pl (-1 lines)
Lines 23-29 use CGI qw ( -utf8 ); Link Here
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
28
(-)a/tools/quotes.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Try::Tiny;
21
use Try::Tiny qw( catch try );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/tools/scheduler.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::Scheduler qw( add_at_job remove_at_job get_jobs );
22
use C4::Scheduler qw( add_at_job get_jobs remove_at_job );
23
use C4::Reports::Guided qw( get_saved_reports );
23
use C4::Reports::Guided qw( get_saved_reports );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::DateUtils;;
27
use Koha::DateUtils qw( dt_from_string output_pref );;
28
28
29
use vars qw($debug);
29
use vars qw($debug);
30
30
(-)a/tools/stage-marc-import.pl (-2 / +1 lines)
Lines 35-46 use MARC::File::USMARC; Link Here
35
use C4::Context;
35
use C4::Context;
36
use C4::Auth qw( get_template_and_user );
36
use C4::Auth qw( get_template_and_user );
37
use C4::Output qw( output_html_with_http_headers );
37
use C4::Output qw( output_html_with_http_headers );
38
use C4::Biblio;
39
use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction sub );
38
use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction sub );
40
use C4::Matcher;
39
use C4::Matcher;
41
use Koha::UploadedFiles;
40
use Koha::UploadedFiles;
42
use C4::BackgroundJob;
41
use C4::BackgroundJob;
43
use C4::MarcModificationTemplates;
42
use C4::MarcModificationTemplates qw( GetModificationTemplates );
44
use Koha::Plugins;
43
use Koha::Plugins;
45
use Koha::ImportBatches;
44
use Koha::ImportBatches;
46
45
(-)a/tools/stockrotation.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
=cut
25
=cut
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI ();
29
29
30
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
31
use C4::Context;
31
use C4::Context;
(-)a/tools/upload-cover-image.pl (-3 / +3 lines)
Lines 39-47 resized, maintaining aspect ratio. Link Here
39
39
40
use Modern::Perl;
40
use Modern::Perl;
41
41
42
use File::Temp;
42
use File::Temp ();
43
use CGI qw ( -utf8 );
43
use CGI qw ( -utf8 );
44
use GD;
44
use GD ();
45
use C4::Context;
45
use C4::Context;
46
use C4::Auth qw( get_template_and_user );
46
use C4::Auth qw( get_template_and_user );
47
use C4::Output qw( output_html_with_http_headers );
47
use C4::Output qw( output_html_with_http_headers );
Lines 49-55 use Koha::Biblios; Link Here
49
use Koha::CoverImages;
49
use Koha::CoverImages;
50
use Koha::Items;
50
use Koha::Items;
51
use Koha::UploadedFiles;
51
use Koha::UploadedFiles;
52
use C4::Log;
52
use C4::Log qw( logaction );
53
53
54
my $debug = 1;
54
my $debug = 1;
55
55
(-)a/tools/upload-file.pl (-3 / +3 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use CGI::Cookie;
23
use CGI::Cookie;
24
use Encode;
24
use Encode ();
25
use JSON;
25
use JSON ();
26
use URI::Escape;
26
use URI::Escape qw( uri_unescape );
27
27
28
use C4::Context;
28
use C4::Context;
29
use C4::Auth qw( check_cookie_auth get_session );
29
use C4::Auth qw( check_cookie_auth get_session );
(-)a/tools/upload.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw/-utf8/;
21
use CGI qw/-utf8/;
22
use JSON;
22
use JSON ();
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/tools/viewlog.pl (-3 / +1 lines)
Lines 24-38 use C4::Auth qw( get_template_and_user ); Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use Text::CSV::Encoded;
25
use Text::CSV::Encoded;
26
use C4::Context;
26
use C4::Context;
27
use C4::Koha;
28
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Items qw( sub );
30
use C4::Serials qw( CountSubscriptionFromBiblionumber );
28
use C4::Serials qw( CountSubscriptionFromBiblionumber );
31
use C4::Search qw( enabled_staff_search_views );
29
use C4::Search qw( enabled_staff_search_views );
32
30
33
use Koha::ActionLogs;
31
use Koha::ActionLogs;
34
use Koha::Database;
32
use Koha::Database;
35
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
36
use Koha::Items;
34
use Koha::Items;
37
use Koha::Patrons;
35
use Koha::Patrons;
38
36
(-)a/virtualshelves/addbybiblionumber.pl (-1 lines)
Lines 59-65 addbybiblionumber.pl Link Here
59
use Modern::Perl;
59
use Modern::Perl;
60
60
61
use CGI qw ( -utf8 );
61
use CGI qw ( -utf8 );
62
use C4::Biblio;
63
use C4::Output qw( output_html_with_http_headers );
62
use C4::Output qw( output_html_with_http_headers );
64
use C4::Auth qw( get_template_and_user );
63
use C4::Auth qw( get_template_and_user );
65
64
(-)a/virtualshelves/downloadshelf.pl (-3 / +1 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
24
23
25
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio qw( GetMarcBiblio );
25
use C4::Biblio qw( GetMarcBiblio );
27
use C4::Items;
28
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
29
use C4::Record;
27
use C4::Record;
30
use C4::Ris;
28
use C4::Ris qw( marc2ris );
31
29
32
use Koha::CsvProfiles;
30
use Koha::CsvProfiles;
33
use Koha::Virtualshelves;
31
use Koha::Virtualshelves;
(-)a/virtualshelves/sendshelf.pl (-5 / +11 lines)
Lines 20-32 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw( encode );
23
use Encode ();
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio qw( GetBiblioData GetMarcBiblio GetMarcAuthors GetMarcSubjects GetMarcISBN );
28
use C4::Biblio qw(
29
use C4::Items qw( sub GetItemsInfo );
29
    GetBiblioData
30
    GetMarcAuthors
31
    GetMarcBiblio
32
    GetMarcISBN
33
    GetMarcSubjects
34
);
35
use C4::Items qw( GetItemsInfo );
30
use C4::Output qw( output_html_with_http_headers );
36
use C4::Output qw( output_html_with_http_headers );
31
use Koha::Email;
37
use Koha::Email;
32
use Koha::Virtualshelves;
38
use Koha::Virtualshelves;
(-)a/virtualshelves/shelves.pl (-2 / +7 lines)
Lines 21-28 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Biblio qw( GetMarcBiblio );
23
use C4::Biblio qw( GetMarcBiblio );
24
use C4::Koha qw( getitemtypeimagelocation GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN );
24
use C4::Koha qw(
25
use C4::Items qw( sub GetItemsLocationInfo );
25
    GetNormalizedEAN
26
    GetNormalizedISBN
27
    GetNormalizedOCLCNumber
28
    GetNormalizedUPC
29
);
30
use C4::Items qw( GetItemsLocationInfo );
26
use C4::Members;
31
use C4::Members;
27
use C4::Output qw( pagination_bar output_html_with_http_headers );
32
use C4::Output qw( pagination_bar output_html_with_http_headers );
28
use C4::XSLT;
33
use C4::XSLT;
(-)a/xt/yaml_valid.pl (-3 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use YAML::XS;
22
use YAML::XS ();
23
23
24
my $usage = <<EOF;
24
my $usage = <<EOF;
25
yaml_valid.pl - give it a filename and it will told you if it is an exact yaml file.
25
yaml_valid.pl - give it a filename and it will told you if it is an exact yaml file.
26
- 

Return to bug 17600