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