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

(-)a/C4/Auth.pm (-2 / +2 lines)
Lines 90-96 C4::Auth - Authenticates Koha users Link Here
90
90
91
=head1 SYNOPSIS
91
=head1 SYNOPSIS
92
92
93
  use CGI qw ( -utf8 );
93
  use CGI qw( -utf8 );
94
  use C4::Auth;
94
  use C4::Auth;
95
  use C4::Output;
95
  use C4::Output;
96
96
Lines 1236-1242 sub checkauth { Link Here
1236
                            : Koha::Cash::Registers->search(
1236
                            : Koha::Cash::Registers->search(
1237
                            { branch => $branchcode, branch_default => 1 },
1237
                            { branch => $branchcode, branch_default => 1 },
1238
                            { rows   => 1 }
1238
                            { rows   => 1 }
1239
                            )->single;
1239
                        )->single;
1240
                        $register_id   = $register->id   if ($register);
1240
                        $register_id   = $register->id   if ($register);
1241
                        $register_name = $register->name if ($register);
1241
                        $register_name = $register->name if ($register);
1242
                    }
1242
                    }
(-)a/C4/Auth_with_cas.pm (-1 / +1 lines)
Lines 28-34 BEGIN { Link Here
28
use C4::Context;
28
use C4::Context;
29
use Koha::AuthUtils qw( get_script_name );
29
use Koha::AuthUtils qw( get_script_name );
30
use Authen::CAS::Client;
30
use Authen::CAS::Client;
31
use CGI qw ( -utf8 );
31
use CGI qw( -utf8 );
32
use YAML::XS;
32
use YAML::XS;
33
use URI::Escape;
33
use URI::Escape;
34
34
(-)a/C4/Form/MessagingPreferences.pm (-1 / +1 lines)
Lines 20-26 package C4::Form::MessagingPreferences; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Members::Messaging;
25
use C4::Members::Messaging;
26
26
(-)a/C4/ILSDI/Services.pm (-2 / +2 lines)
Lines 27-33 use C4::Accounts; Link Here
27
use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved );
27
use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved );
28
use C4::Context;
28
use C4::Context;
29
use C4::Auth;
29
use C4::Auth;
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
use DateTime;
31
use DateTime;
32
use C4::Auth;
32
use C4::Auth;
33
use Koha::DateUtils     qw( dt_from_string );
33
use Koha::DateUtils     qw( dt_from_string );
Lines 54-60 hashref that will be printed by XML::Simple in opac/ilsdi.pl Link Here
54
54
55
    use C4::ILSDI::Services;
55
    use C4::ILSDI::Services;
56
    use XML::Simple;
56
    use XML::Simple;
57
    use CGI qw ( -utf8 );
57
    use CGI qw( -utf8 );
58
58
59
    my $cgi = new CGI;
59
    my $cgi = new CGI;
60
60
(-)a/C4/InstallAuth.pm (-1 / +1 lines)
Lines 42-48 InstallAuth - Authenticates Koha users for Install process Link Here
42
42
43
=head1 SYNOPSIS
43
=head1 SYNOPSIS
44
44
45
  use CGI qw ( -utf8 );
45
  use CGI qw( -utf8 );
46
  use InstallAuth;
46
  use InstallAuth;
47
  use C4::Output;
47
  use C4::Output;
48
48
(-)a/C4/Installer.pm (-1 / +1 lines)
Lines 30-36 use C4::Context; Link Here
30
use Koha::Schema;
30
use Koha::Schema;
31
use Koha;
31
use Koha;
32
use Koha::Installer;
32
use Koha::Installer;
33
use Koha::Installer::Output qw ( say_failure );
33
use Koha::Installer::Output qw( say_failure );
34
34
35
use vars qw(@ISA @EXPORT);
35
use vars qw(@ISA @EXPORT);
36
36
(-)a/C4/Reports.pm (-1 / +1 lines)
Lines 26-32 BEGIN { Link Here
26
    );
26
    );
27
}
27
}
28
28
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
30
31
use C4::Context;
31
use C4::Context;
32
32
(-)a/C4/Reports/Guided.pm (-1 / +1 lines)
Lines 38-44 BEGIN { Link Here
38
    );
38
    );
39
}
39
}
40
40
41
use CGI  qw ( -utf8 );
41
use CGI  qw( -utf8 );
42
use Carp qw( carp croak );
42
use Carp qw( carp croak );
43
use JSON qw( from_json );
43
use JSON qw( from_json );
44
44
(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-1 / +1 lines)
Lines 10-16 use strict; Link Here
10
use POSIX        qw(strftime);
10
use POSIX        qw(strftime);
11
use C4::SIP::Sip qw( siplog );
11
use C4::SIP::Sip qw( siplog );
12
use Data::Dumper;
12
use Data::Dumper;
13
use CGI qw ( -utf8 );
13
use CGI qw( -utf8 );
14
14
15
use C4::SIP::ILS::Transaction;
15
use C4::SIP::ILS::Transaction;
16
16
(-)a/C4/SIP/Logger.pm (-1 / +1 lines)
Lines 3-9 package C4::SIP::Logger; Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use base 'Exporter';
5
use base 'Exporter';
6
BEGIN { our @EXPORT_OK = qw ( get_logger set_logger ); }
6
BEGIN { our @EXPORT_OK = qw( get_logger set_logger ); }
7
7
8
our $activeSIPServer;
8
our $activeSIPServer;
9
our $activeLogger;
9
our $activeLogger;
(-)a/C4/SIP/Sip/MsgType.pm (-1 / +1 lines)
Lines 15-21 use C4::SIP::Sip::Constants qw(:all); Link Here
15
use C4::SIP::Sip::Checksum  qw(verify_cksum);
15
use C4::SIP::Sip::Checksum  qw(verify_cksum);
16
16
17
use Data::Dumper;
17
use Data::Dumper;
18
use CGI qw ( -utf8 );
18
use CGI qw( -utf8 );
19
use C4::Context;
19
use C4::Context;
20
use C4::Auth  qw(&check_api_auth);
20
use C4::Auth  qw(&check_api_auth);
21
use C4::Items qw(ModDateLastSeen);
21
use C4::Items qw(ModDateLastSeen);
(-)a/C4/Service.pm (-1 / +1 lines)
Lines 41-47 This module packages several useful functions for JSON webservices. Link Here
41
use strict;
41
use strict;
42
use warnings;
42
use warnings;
43
43
44
use CGI        qw ( -utf8 );
44
use CGI        qw( -utf8 );
45
use C4::Auth   qw( check_api_auth );
45
use C4::Auth   qw( check_api_auth );
46
use C4::Output qw( output_with_http_headers );
46
use C4::Output qw( output_with_http_headers );
47
use C4::Output::JSONStream;
47
use C4::Output::JSONStream;
(-)a/C4/Suggestions.pm (-1 / +1 lines)
Lines 34-40 BEGIN { Link Here
34
    );
34
    );
35
}
35
}
36
36
37
use CGI qw ( -utf8 );
37
use CGI qw( -utf8 );
38
38
39
use C4::Context;
39
use C4::Context;
40
use C4::Output;
40
use C4::Output;
(-)a/C4/Templates.pm (-1 / +1 lines)
Lines 3-9 package C4::Templates; Link Here
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
use Carp            qw( carp );
5
use Carp            qw( carp );
6
use CGI             qw ( -utf8 );
6
use CGI             qw( -utf8 );
7
use List::MoreUtils qw( uniq );
7
use List::MoreUtils qw( uniq );
8
8
9
# Copyright 2009 Chris Cormack and The Koha Dev Team
9
# Copyright 2009 Chris Cormack and The Koha Dev Team
(-)a/Koha/OAI/Client/Harvester.pm (-1 / +1 lines)
Lines 31-37 use utf8; Link Here
31
use open qw( :std :utf8 );
31
use open qw( :std :utf8 );
32
32
33
use C4::Biblio          qw( AddBiblio GetFrameworkCode ModBiblio DelBiblio );
33
use C4::Biblio          qw( AddBiblio GetFrameworkCode ModBiblio DelBiblio );
34
use C4::AuthoritiesMarc qw (AddAuthority GuessAuthTypeCode ModAuthority DelAuthority );
34
use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode ModAuthority DelAuthority );
35
use HTTP::OAI;
35
use HTTP::OAI;
36
use HTTP::OAI::Metadata::OAI_DC;
36
use HTTP::OAI::Metadata::OAI_DC;
37
use Koha::DateUtils qw( dt_from_string );
37
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/Patron/Discharge.pm (-1 / +1 lines)
Lines 6-12 use File::Temp qw( tmpnam ); Link Here
6
use IPC::Cmd;
6
use IPC::Cmd;
7
use Carp qw( carp );
7
use Carp qw( carp );
8
8
9
use C4::Templates qw ( gettemplate );
9
use C4::Templates qw( gettemplate );
10
use C4::Letters   qw( GetPreparedLetter );
10
use C4::Letters   qw( GetPreparedLetter );
11
11
12
use Koha::Database;
12
use Koha::Database;
(-)a/about.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use DateTime::TimeZone;
26
use DateTime::TimeZone;
27
use File::Slurp               qw( read_file );
27
use File::Slurp               qw( read_file );
28
use IPC::Cmd                  qw(can_run);
28
use IPC::Cmd                  qw(can_run);
(-)a/acqui/acqui-home.pl (-1 / +1 lines)
Lines 28-34 this script is the main page for acqui Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
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::Budgets                   qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
34
use C4::Budgets                   qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
(-)a/acqui/addorder.pl (-2 / +2 lines)
Lines 117-124 if it is an order from an existing suggestion : the id of this suggestion. Link Here
117
=cut
117
=cut
118
118
119
use Modern::Perl;
119
use Modern::Perl;
120
use CGI  qw ( -utf8 );
120
use CGI  qw( -utf8 );
121
use JSON qw ( to_json encode_json );
121
use JSON qw( to_json encode_json );
122
122
123
use C4::Acquisition qw( FillWithDefaultValues ModOrderUsers );
123
use C4::Acquisition qw( FillWithDefaultValues ModOrderUsers );
124
use C4::Auth        qw( get_template_and_user );
124
use C4::Auth        qw( get_template_and_user );
(-)a/acqui/addorderiso2709.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use List::MoreUtils;
26
use List::MoreUtils;
27
use Encode;
27
use Encode;
28
use Scalar::Util qw( looks_like_number );
28
use Scalar::Util qw( looks_like_number );
(-)a/acqui/ajax-getauthvaluedropbox.pl (-1 / +1 lines)
Lines 47-53 Default value for the dropbox. Link Here
47
47
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 qw( NormalizeString );
52
use C4::Auth    qw( check_api_auth );
52
use C4::Auth    qw( check_api_auth );
53
use Koha::AuthorisedValues;
53
use Koha::AuthorisedValues;
(-)a/acqui/basket.pl (-1 / +1 lines)
Lines 23-29 Link Here
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::Output qw( output_html_with_http_headers output_and_exit );
25
use C4::Output qw( output_html_with_http_headers output_and_exit );
26
use CGI        qw ( -utf8 );
26
use CGI        qw( -utf8 );
27
use C4::Acquisition
27
use C4::Acquisition
28
    qw( GetBasket CanUserManageBasket GetBasketAsCSV NewBasket NewBasketgroup ModBasket ReopenBasket ModBasketUsers GetBasketgroup GetBasketgroups GetBasketUsers GetOrders GetOrder get_rounded_price );
28
    qw( GetBasket CanUserManageBasket GetBasketAsCSV NewBasket NewBasketgroup ModBasket ReopenBasket ModBasketUsers GetBasketgroup GetBasketgroups GetBasketUsers GetOrders GetOrder get_rounded_price );
29
use C4::Budgets  qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
29
use C4::Budgets  qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
(-)a/acqui/basketgroup.pl (-1 / +1 lines)
Lines 47-53 use Carp qw( croak ); Link Here
47
47
48
use C4::Auth   qw( get_template_and_user );
48
use C4::Auth   qw( get_template_and_user );
49
use C4::Output qw( output_html_with_http_headers );
49
use C4::Output qw( output_html_with_http_headers );
50
use CGI        qw ( -utf8 );
50
use CGI        qw( -utf8 );
51
use File::Spec;
51
use File::Spec;
52
52
53
use C4::Acquisition
53
use C4::Acquisition
(-)a/acqui/basketheader.pl (-3 / +2 lines)
Lines 46-52 If it exists, C<$basketno> is the basket we edit Link Here
46
=cut
46
=cut
47
47
48
use Modern::Perl;
48
use Modern::Perl;
49
use CGI qw ( -utf8 );
49
use CGI qw( -utf8 );
50
use C4::Context;
50
use C4::Context;
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 );
Lines 181-188 if ( $op eq 'add_form' ) { Link Here
181
                my $schema = Koha::Database->new()->schema();
181
                my $schema = Koha::Database->new()->schema();
182
                my $vendor_edi_account =
182
                my $vendor_edi_account =
183
                    $schema->resultset('VendorEdiAccount')
183
                    $schema->resultset('VendorEdiAccount')
184
                    ->search( { vendor_id => scalar $input->param('basketbooksellerid') } )
184
                    ->search( { vendor_id => scalar $input->param('basketbooksellerid') } )->first;
185
                    ->first;
186
185
187
                if ( $vendor_edi_account && $vendor_edi_account->po_is_basketname ) {
186
                if ( $vendor_edi_account && $vendor_edi_account->po_is_basketname ) {
188
187
(-)a/acqui/booksellers.pl (-1 / +1 lines)
Lines 42-48 The id of the supplier whose baskets we will display Link Here
42
use Modern::Perl;
42
use Modern::Perl;
43
use C4::Auth   qw( get_template_and_user haspermission );
43
use C4::Auth   qw( get_template_and_user haspermission );
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
46
47
use C4::Acquisition qw( GetBasket GetBasketsInfosByBookseller CanUserManageBasket GetBasketgroup );
47
use C4::Acquisition qw( GetBasket GetBasketsInfosByBookseller CanUserManageBasket GetBasketgroup );
48
use C4::Budgets     qw( GetBudgetHierarchy CanUserUseBudget );
48
use C4::Budgets     qw( GetBudgetHierarchy CanUserUseBudget );
(-)a/acqui/check_budget_total.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/acqui/check_uniqueness.pl (-1 / +1 lines)
Lines 31-37 Link Here
31
31
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI        qw ( -utf8 );
34
use CGI        qw( -utf8 );
35
use JSON       qw( to_json );
35
use JSON       qw( to_json );
36
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  qw( SearchItems );
(-)a/acqui/duplicate_orders.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth        qw( get_template_and_user );
24
use C4::Auth        qw( get_template_and_user );
25
use C4::Output      qw( output_and_exit output_html_with_http_headers );
25
use C4::Output      qw( output_and_exit output_html_with_http_headers );
(-)a/acqui/finishreceive.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( checkauth );
25
use C4::Auth qw( checkauth );
26
use JSON     qw( encode_json );
26
use JSON     qw( encode_json );
27
use C4::Output;
27
use C4::Output;
(-)a/acqui/histsearch.pl (-1 / +1 lines)
Lines 50-56 to filter on ended date. Link Here
50
=cut
50
=cut
51
51
52
use Modern::Perl;
52
use Modern::Perl;
53
use CGI             qw ( -utf8 );
53
use CGI             qw( -utf8 );
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 qw( GetHistory );
56
use C4::Acquisition qw( GetHistory );
(-)a/acqui/invoice.pl (-1 / +1 lines)
Lines 28-34 Invoice details Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
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_and_exit output_html_with_http_headers );
33
use C4::Output qw( output_and_exit output_html_with_http_headers );
34
use C4::Acquisition
34
use C4::Acquisition
(-)a/acqui/invoices.pl (-1 / +1 lines)
Lines 28-34 Search for invoices Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
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
34
(-)a/acqui/lateorders-export.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
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 );
(-)a/acqui/lateorders.pl (-1 / +1 lines)
Lines 43-49 To know on which branch this script have to display late order. Link Here
43
=cut
43
=cut
44
44
45
use Modern::Perl;
45
use Modern::Perl;
46
use CGI        qw ( -utf8 );
46
use CGI        qw( -utf8 );
47
use C4::Auth   qw( get_template_and_user );
47
use C4::Auth   qw( get_template_and_user );
48
use C4::Output qw( output_html_with_http_headers );
48
use C4::Output qw( output_html_with_http_headers );
49
use C4::Context;
49
use C4::Context;
(-)a/acqui/moddeliverydate.pl (-1 / +1 lines)
Lines 30-36 its basket is closed. Link Here
30
30
31
use Modern::Perl;
31
use Modern::Perl;
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_html_with_http_headers );
35
use C4::Output      qw( output_html_with_http_headers );
36
use C4::Acquisition qw( GetOrder GetBasket ModOrder );
36
use C4::Acquisition qw( GetOrder GetBasket ModOrder );
(-)a/acqui/modordernotes.pl (-1 / +1 lines)
Lines 28-34 Modify just notes when basket is closed. Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
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::Acquisition qw( GetOrder GetBasket ModOrder );
34
use C4::Acquisition qw( GetOrder GetBasket ModOrder );
(-)a/acqui/neworderempty.pl (-1 / +1 lines)
Lines 64-70 the item's id in the breeding reservoir Link Here
64
=cut
64
=cut
65
65
66
use Modern::Perl;
66
use Modern::Perl;
67
use CGI qw ( -utf8 );
67
use CGI qw( -utf8 );
68
use C4::Context;
68
use C4::Context;
69
69
70
use C4::Auth    qw( get_template_and_user );
70
use C4::Auth    qw( get_template_and_user );
(-)a/acqui/newordersubscription.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI             qw ( -utf8 );
21
use CGI             qw( -utf8 );
22
use C4::Acquisition qw( GetBasket );
22
use C4::Acquisition qw( GetBasket );
23
use C4::Auth        qw( get_template_and_user );
23
use C4::Auth        qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/acqui/newordersuggestion.pl (-1 / +1 lines)
Lines 90-96 can be equal to Link Here
90
90
91
use Modern::Perl;
91
use Modern::Perl;
92
92
93
use CGI             qw ( -utf8 );
93
use CGI             qw( -utf8 );
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 qw( ConnectSuggestionAndBiblio ModSuggestion );
96
use C4::Suggestions qw( ConnectSuggestionAndBiblio ModSuggestion );
(-)a/acqui/ordered.pl (-1 / +1 lines)
Lines 29-35 this script is to show orders ordered but not yet received Link Here
29
29
30
use C4::Context;
30
use C4::Context;
31
use Modern::Perl;
31
use Modern::Perl;
32
use CGI        qw ( -utf8 );
32
use CGI        qw( -utf8 );
33
use C4::Auth   qw( get_template_and_user );
33
use C4::Auth   qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use Koha::Acquisition::Invoice::Adjustments;
35
use Koha::Acquisition::Invoice::Adjustments;
(-)a/acqui/orderreceive.pl (-1 / +1 lines)
Lines 59-65 The biblionumber of this order. Link Here
59
59
60
use Modern::Perl;
60
use Modern::Perl;
61
61
62
use CGI qw ( -utf8 );
62
use CGI qw( -utf8 );
63
use C4::Context;
63
use C4::Context;
64
use C4::Acquisition qw( GetInvoice );
64
use C4::Acquisition qw( GetInvoice );
65
use C4::Auth        qw( get_template_and_user );
65
use C4::Auth        qw( get_template_and_user );
(-)a/acqui/parcel.pl (-1 / +1 lines)
Lines 58-64 use Modern::Perl; Link Here
58
use C4::Auth        qw( get_template_and_user );
58
use C4::Auth        qw( get_template_and_user );
59
use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price );
59
use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price );
60
use C4::Budgets     qw( GetBudget GetBudgetByOrderNumber GetBudgetName );
60
use C4::Budgets     qw( GetBudget GetBudgetByOrderNumber GetBudgetName );
61
use CGI             qw ( -utf8 );
61
use CGI             qw( -utf8 );
62
use C4::Output      qw( output_html_with_http_headers );
62
use C4::Output      qw( output_html_with_http_headers );
63
63
64
use Koha::Acquisition::Baskets;
64
use Koha::Acquisition::Baskets;
(-)a/acqui/parcels.pl (-1 / +1 lines)
Lines 65-71 To know how many results have to be display / page. Link Here
65
=cut
65
=cut
66
66
67
use Modern::Perl;
67
use Modern::Perl;
68
use CGI        qw ( -utf8 );
68
use CGI        qw( -utf8 );
69
use C4::Auth   qw( get_template_and_user );
69
use C4::Auth   qw( get_template_and_user );
70
use C4::Output qw( output_html_with_http_headers );
70
use C4::Output qw( output_html_with_http_headers );
71
71
(-)a/acqui/showorder.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
20
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 );
(-)a/acqui/spent.pl (-1 / +1 lines)
Lines 33-39 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_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use Modern::Perl;
35
use Modern::Perl;
36
use CGI             qw ( -utf8 );
36
use CGI             qw( -utf8 );
37
use C4::Acquisition qw( get_rounded_price );
37
use C4::Acquisition qw( get_rounded_price );
38
use Koha::Acquisition::Invoice::Adjustments;
38
use Koha::Acquisition::Invoice::Adjustments;
39
39
(-)a/acqui/transferorder.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>
20
# along with Koha; if not, see <https://www.gnu.org/licenses>
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/acqui/uncertainprice.pl (-1 / +1 lines)
Lines 45-51 use Modern::Perl; Link Here
45
45
46
use C4::Auth   qw( get_template_and_user );
46
use C4::Auth   qw( get_template_and_user );
47
use C4::Output qw( output_html_with_http_headers );
47
use C4::Output qw( output_html_with_http_headers );
48
use CGI        qw ( -utf8 );
48
use CGI        qw( -utf8 );
49
49
50
use C4::Acquisition qw( SearchOrders GetOrder ModOrder );
50
use C4::Acquisition qw( SearchOrders GetOrder ModOrder );
51
51
(-)a/acqui/vendor_issues.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
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;
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
(-)a/acqui/vendors.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth   qw( get_template_and_user haspermission );
21
use C4::Auth   qw( get_template_and_user haspermission );
22
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
23
use CGI        qw ( -utf8 );
23
use CGI        qw( -utf8 );
24
24
25
use C4::Context;
25
use C4::Context;
26
26
(-)a/admin/admin-home.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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::Plugins;
23
use Koha::Plugins;
(-)a/admin/adveditorshortcuts.pl (-1 / +1 lines)
Lines 38-44 use Modern::Perl; Link Here
38
use C4::Auth qw( get_template_and_user );
38
use C4::Auth qw( get_template_and_user );
39
use C4::Context;
39
use C4::Context;
40
use C4::Output qw( output_html_with_http_headers );
40
use C4::Output qw( output_html_with_http_headers );
41
use CGI        qw ( -utf8 );
41
use CGI        qw( -utf8 );
42
use Koha::KeyboardShortcuts;
42
use Koha::KeyboardShortcuts;
43
43
44
my $input = CGI->new;
44
my $input = CGI->new;
(-)a/admin/aqbudgetperiods.pl (-1 / +1 lines)
Lines 46-52 script to administer the budget periods table Link Here
46
46
47
use Modern::Perl;
47
use Modern::Perl;
48
48
49
use CGI  qw ( -utf8 );
49
use CGI  qw( -utf8 );
50
use JSON qw( encode_json );
50
use JSON qw( encode_json );
51
use Koha::Database;
51
use Koha::Database;
52
use C4::Koha;
52
use C4::Koha;
(-)a/admin/aqbudgets.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use C4::Auth    qw( get_template_and_user );
27
use C4::Auth    qw( get_template_and_user );
(-)a/admin/aqcontract.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
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 );
(-)a/admin/aqplan.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# This software is placed under the gnu General Public License, v2 (https://www.gnu.org/licenses/gpl.html)
21
# This software is placed under the gnu General Public License, v2 (https://www.gnu.org/licenses/gpl.html)
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI         qw ( -utf8 );
24
use CGI         qw( -utf8 );
25
use Date::Calc  qw( Delta_YMD );
25
use Date::Calc  qw( Delta_YMD );
26
use Date::Manip qw( DateCalc UnixDate );
26
use Date::Manip qw( DateCalc UnixDate );
27
use Text::CSV_XS;
27
use Text::CSV_XS;
(-)a/admin/auth_subfields_structure.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Output qw( output_html_with_http_headers );
21
use C4::Output qw( output_html_with_http_headers );
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
25
26
use Koha::Authority::Types;
26
use Koha::Authority::Types;
(-)a/admin/auth_tag_structure.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::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 );
(-)a/admin/authorised_values.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
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 );
(-)a/admin/authtypes.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/background_jobs.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
20
21
use C4::Context;
21
use C4::Context;
22
use Koha::DateUtils qw( dt_from_string );
22
use Koha::DateUtils qw( dt_from_string );
(-)a/admin/biblio_framework.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
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/admin/branch_transfer_limits.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
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::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 );
(-)a/admin/branches.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI       qw ( -utf8 );
23
use CGI       qw( -utf8 );
24
use Try::Tiny qw( catch try );
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 );
(-)a/admin/categories.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/admin/check_budget_parent.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/check_parent_total.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/checkmarc.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Output qw( output_html_with_http_headers );
21
use C4::Output qw( output_html_with_http_headers );
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
25
26
my $input = CGI->new;
26
my $input = CGI->new;
(-)a/admin/cities.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
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/admin/classsources.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
#
20
#
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::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 );
(-)a/admin/clone-rules.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
# The script can be called with one of the parameters, both or none
25
# The script can be called with one of the parameters, both or none
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI qw ( -utf8 );
28
use CGI qw( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
use C4::Auth   qw( get_template_and_user );
31
use C4::Auth   qw( get_template_and_user );
(-)a/admin/credit_types.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI       qw ( -utf8 );
21
use CGI       qw( -utf8 );
22
use Try::Tiny qw( catch try );
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
(-)a/admin/curbside_pickup.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Context;
20
use C4::Context;
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 );
(-)a/admin/currency.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::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 );
(-)a/admin/debit_types.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI       qw ( -utf8 );
21
use CGI       qw( -utf8 );
22
use Try::Tiny qw( catch try );
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
(-)a/admin/desks.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/didyoumean.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 qw ( -utf8 );
4
use CGI qw( -utf8 );
5
use C4::Context;
5
use C4::Context;
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 );
(-)a/admin/file_transports.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
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    qw( catch try );
24
use Try::Tiny    qw( catch try );
25
25
(-)a/admin/float_limits.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
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 );
(-)a/admin/identity_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          qw ( -utf8 );
22
use CGI          qw( -utf8 );
23
use Scalar::Util qw( blessed );
23
use Scalar::Util qw( blessed );
24
use Try::Tiny    qw( catch try );
24
use Try::Tiny    qw( catch try );
25
25
(-)a/admin/ill_batch_statuses.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI       qw ( -utf8 );
21
use CGI       qw( -utf8 );
22
use Try::Tiny qw( catch try );
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
(-)a/admin/import_export_authtype.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use CGI::Cookie;
22
use CGI::Cookie;
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth                  qw/check_cookie_auth/;
24
use C4::Auth                  qw/check_cookie_auth/;
(-)a/admin/import_export_framework.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use CGI::Cookie;
22
use CGI::Cookie;
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth                  qw( check_cookie_auth );
24
use C4::Auth                  qw( check_cookie_auth );
(-)a/admin/item_circulation_alerts.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI  qw ( -utf8 );
20
use CGI  qw( -utf8 );
21
use JSON qw( encode_json );
21
use JSON qw( encode_json );
22
22
23
#use Data::Dump 'pp';
23
#use Data::Dump 'pp';
(-)a/admin/itemtypes.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
=cut
23
=cut
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw( -utf8 );
27
27
28
use C4::Koha qw( getImageSets GetAuthorisedValues );
28
use C4::Koha qw( getImageSets GetAuthorisedValues );
29
use C4::Context;
29
use C4::Context;
(-)a/admin/koha2marclinks.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
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 );
(-)a/admin/library_groups.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/marc-overlay-rules.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use Try::Tiny;
21
use Try::Tiny;
22
22
23
use C4::Context;
23
use C4::Context;
(-)a/admin/marc_order_accounts.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Auth    qw( get_template_and_user );
28
use C4::Auth    qw( get_template_and_user );
(-)a/admin/marc_subfields_structure.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use Encode     qw( encode_utf8 );
21
use Encode     qw( encode_utf8 );
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 CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use Koha::Authority::Types;
27
use Koha::Authority::Types;
(-)a/admin/marctagstructure.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Biblio qw( GetMarcFromKohaField );
24
use C4::Biblio qw( GetMarcFromKohaField );
(-)a/admin/matching-rules.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
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::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 );
(-)a/admin/oai_servers.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# delete_confirmed deletes a record and goes to list view.
21
# delete_confirmed deletes a record and goes to list view.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
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 );
(-)a/admin/oai_set_mappings.pl (-1 / +1 lines)
Lines 32-38 the OR operator will be applied. Link Here
32
32
33
use Modern::Perl;
33
use Modern::Perl;
34
34
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 qw( GetOAISet GetOAISetMappings ModOAISetMappings );
38
use C4::OAI::Sets qw( GetOAISet GetOAISetMappings ModOAISetMappings );
(-)a/admin/oai_sets.pl (-1 / +1 lines)
Lines 28-34 Admin page to describe OAI SETs Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
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 qw( AddOAISet DelOAISet GetOAISet GetOAISets ModOAISet );
34
use C4::OAI::Sets qw( AddOAISet DelOAISet GetOAISet GetOAISets ModOAISet );
(-)a/admin/overdrive.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::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 );
(-)a/admin/patron-attr-types.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
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 );
(-)a/admin/preferences.pl (-3 / +3 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Context;
24
use C4::Context;
25
use C4::Koha        qw( getallthemes );
25
use C4::Koha        qw( getallthemes );
Lines 167-173 sub _get_chunk { Link Here
167
        @values = split /,/, $value if defined($value);
167
        @values = split /,/, $value if defined($value);
168
        $chunk->{'CHOICES'} = [
168
        $chunk->{'CHOICES'} = [
169
            sort { $a->{'text'} cmp $b->{'text'} }
169
            sort { $a->{'text'} cmp $b->{'text'} }
170
            map {
170
                map {
171
                my $c = $_;
171
                my $c = $_;
172
                {
172
                {
173
                    text     => $options{'choices'}->{$c},
173
                    text     => $options{'choices'}->{$c},
Lines 190-196 sub _get_chunk { Link Here
190
        $chunk->{type}    = 'multiple';
190
        $chunk->{type}    = 'multiple';
191
        $chunk->{CHOICES} = [
191
        $chunk->{CHOICES} = [
192
            sort { $a->{'text'} cmp $b->{'text'} }
192
            sort { $a->{'text'} cmp $b->{'text'} }
193
            map {
193
                map {
194
                my $option_value = $_;
194
                my $option_value = $_;
195
                {
195
                {
196
                    text     => $options{multiple}->{$option_value},
196
                    text     => $options{multiple}->{$option_value},
(-)a/admin/record_sources.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/admin/restrictions.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI       qw ( -utf8 );
22
use CGI       qw( -utf8 );
23
use Try::Tiny qw( try catch );
23
use Try::Tiny qw( try catch );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/admin/share_content.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI  qw ( -utf8 );
20
use CGI  qw( -utf8 );
21
use JSON qw( to_json );
21
use JSON qw( to_json );
22
use HTTP::Request;
22
use HTTP::Request;
23
23
(-)a/admin/smart-rules.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/smtp_servers.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
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    qw( catch try );
24
use Try::Tiny    qw( catch try );
25
25
(-)a/admin/systempreferences.pl (-1 / +1 lines)
Lines 42-48 ALSO : Link Here
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
44
45
use CGI          qw ( -utf8 );
45
use CGI          qw( -utf8 );
46
use MIME::Base64 qw( encode_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;
(-)a/admin/transfer_limits.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/admin/transport-cost-matrix.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/admin/usage_statistics.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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( output_pref );
23
use Koha::DateUtils qw( output_pref );
(-)a/admin/z3950servers.pl (-1 / +1 lines)
Lines 24-30 Link Here
24
# delete_confirmed deletes a record and goes to list view.
24
# delete_confirmed deletes a record and goes to list view.
25
25
26
use Modern::Perl;
26
use Modern::Perl;
27
use CGI qw ( -utf8 );
27
use CGI qw( -utf8 );
28
use C4::Context;
28
use C4::Context;
29
use C4::Auth   qw( get_template_and_user );
29
use C4::Auth   qw( get_template_and_user );
30
use C4::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
(-)a/authorities/auth_finder.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI        qw ( -utf8 );
22
use CGI        qw( -utf8 );
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::Context;
25
use C4::Context;
(-)a/authorities/authorities-home.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI         qw ( -utf8 );
22
use CGI         qw( -utf8 );
23
use URI::Escape qw( uri_escape_utf8 );
23
use URI::Escape qw( uri_escape_utf8 );
24
use POSIX       qw( ceil );
24
use POSIX       qw( ceil );
25
25
(-)a/authorities/authorities.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI        qw ( -utf8 );
22
use CGI        qw( -utf8 );
23
use POSIX      qw( strftime );
23
use POSIX      qw( strftime );
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/authorities/blinddetail-biblio-search.pl (-1 / +1 lines)
Lines 42-48 use C4::Auth qw( get_template_and_user ); Link Here
42
use C4::AuthoritiesMarc qw( GetAuthority );
42
use C4::AuthoritiesMarc qw( GetAuthority );
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
46
47
use Koha::Authorities;
47
use Koha::Authorities;
48
use Koha::Authority::Types;
48
use Koha::Authority::Types;
(-)a/authorities/detail-biblio-search.pl (-1 / +1 lines)
Lines 42-48 use C4::Auth qw( get_template_and_user ); Link Here
42
use C4::AuthoritiesMarc qw( GetAuthority GetTagsLabels );
42
use C4::AuthoritiesMarc qw( GetAuthority GetTagsLabels );
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
46
47
# use C4::Biblio;
47
# use C4::Biblio;
48
# use C4::Catalogue;
48
# use C4::Catalogue;
(-)a/authorities/detail.pl (-1 / +1 lines)
Lines 38-44 parameters tables. Link Here
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
40
41
use CGI qw ( -utf8 );
41
use CGI qw( -utf8 );
42
42
43
use C4::Auth            qw( get_template_and_user );
43
use C4::Auth            qw( get_template_and_user );
44
use C4::AuthoritiesMarc qw( GetAuthority GenerateHierarchy GetTagsLabels );
44
use C4::AuthoritiesMarc qw( GetAuthority GenerateHierarchy GetTagsLabels );
(-)a/authorities/export.pl (-1 / +1 lines)
Lines 5-11 use C4::Record; Link Here
5
use C4::Auth qw( get_template_and_user );
5
use C4::Auth qw( get_template_and_user );
6
use C4::Output;
6
use C4::Output;
7
use C4::AuthoritiesMarc qw( GetAuthority );
7
use C4::AuthoritiesMarc qw( GetAuthority );
8
use CGI                 qw ( -utf8 );
8
use CGI                 qw( -utf8 );
9
9
10
my $query = CGI->new;
10
my $query = CGI->new;
11
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
11
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/authorities/merge.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI                 qw ( -utf8 );
21
use CGI                 qw( -utf8 );
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::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority GetTagsLabels merge );
24
use C4::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority GetTagsLabels merge );
(-)a/authorities/merge_ajax.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
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 qw( encode_json );
7
use JSON qw( encode_json );
8
8
(-)a/authorities/ysearch.pl (-1 / +1 lines)
Lines 27-33 This script allows ajax call for dynamic authorities search Link Here
27
27
28
=cut
28
=cut
29
29
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
use Modern::Perl;
31
use Modern::Perl;
32
use JSON qw( to_json );
32
use JSON qw( to_json );
33
33
(-)a/basket/basket.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Koha;
20
use C4::Koha;
21
use C4::Biblio qw(
21
use C4::Biblio qw(
22
    GetMarcSeries
22
    GetMarcSeries
(-)a/basket/downloadcart.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
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 );
(-)a/basket/sendbasket.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use Encode;
21
use Encode;
22
use Carp      qw( carp );
22
use Carp      qw( carp );
23
use Try::Tiny qw( catch try );
23
use Try::Tiny qw( catch try );
(-)a/bookings/list.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
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 );
(-)a/catalogue/ISBDdetail.pl (-1 / +1 lines)
Lines 39-45 use HTML::Entities; Link Here
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::Biblio  qw( GetBiblioData GetISBDView );
43
use C4::Biblio  qw( GetBiblioData GetISBDView );
44
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
44
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
45
use C4::Search  qw( z3950_search_args enabled_staff_search_views );
45
use C4::Search  qw( z3950_search_args enabled_staff_search_views );
(-)a/catalogue/MARCdetail.pl (-1 / +1 lines)
Lines 44-50 the items attached to the biblio Link Here
44
=cut
44
=cut
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 );
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use HTML::Entities;
21
use HTML::Entities;
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
(-)a/catalogue/export.pl (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
use C4::Record;
4
use C4::Record;
5
use C4::Auth qw( get_template_and_user );
5
use C4::Auth qw( get_template_and_user );
6
use C4::Output;
6
use C4::Output;
7
use CGI     qw ( -utf8 );
7
use CGI     qw( -utf8 );
8
use C4::Ris qw( marc2ris );
8
use C4::Ris qw( marc2ris );
9
9
10
my $query = CGI->new;
10
my $query = CGI->new;
(-)a/catalogue/image.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
25
26
use Modern::Perl;
26
use Modern::Perl;
27
27
28
use CGI qw ( -utf8 );
28
use CGI qw( -utf8 );
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::Biblios;
31
use Koha::Biblios;
(-)a/catalogue/imageviewer.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Search qw( enabled_staff_search_views );
25
use C4::Search qw( enabled_staff_search_views );
(-)a/catalogue/issuehistory.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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
23
(-)a/catalogue/labeledMARCdetail.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
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 C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/catalogue/moredetail.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Koha qw( GetAuthorisedValues );
22
use C4::Koha qw( GetAuthorisedValues );
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use HTML::Entities;
24
use HTML::Entities;
25
use C4::Biblio      qw( GetBiblioData GetFrameworkCode );
25
use C4::Biblio      qw( GetBiblioData GetFrameworkCode );
26
use C4::Acquisition qw( GetOrderFromItemnumber GetBasket GetInvoice );
26
use C4::Acquisition qw( GetOrderFromItemnumber GetBasket GetInvoice );
(-)a/catalogue/search-history.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# <https://www.gnu.org/licenses>
19
# <https://www.gnu.org/licenses>
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Search::History;
25
use C4::Search::History;
(-)a/catalogue/updateitem.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# You should have received a copy of the GNU General Public License
18
# You should have received a copy of the GNU General Public License
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
use Modern::Perl;
20
use Modern::Perl;
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::Output;
24
use C4::Output;
(-)a/cataloguing/addbooks.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
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::Breeding qw( BreedingSearch );
28
use C4::Breeding qw( BreedingSearch );
29
use C4::Output   qw( output_html_with_http_headers pagination_bar );
29
use C4::Output   qw( output_html_with_http_headers pagination_bar );
(-)a/cataloguing/additem.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
25
26
use C4::Auth qw( get_template_and_user haspermission );
26
use C4::Auth qw( get_template_and_user haspermission );
27
use C4::Barcodes::ValueBuilder;
27
use C4::Barcodes::ValueBuilder;
(-)a/cataloguing/cataloging-home.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
#
17
#
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI        qw ( -utf8 );
20
use CGI        qw( -utf8 );
21
use C4::Auth   qw( get_cataloguing_page_permissions get_template_and_user );
21
use C4::Auth   qw( get_cataloguing_page_permissions 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 C4::Context;
23
use C4::Context;
(-)a/cataloguing/concerns.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use C4::Context;
21
use C4::Context;
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/cataloguing/linkitem.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio qw( ModBiblio PrepHostMarcField );
27
use C4::Biblio qw( ModBiblio PrepHostMarcField );
(-)a/cataloguing/merge.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
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 );
(-)a/cataloguing/merge_ajax.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
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 qw( encode_json );
7
use JSON qw( encode_json );
8
8
(-)a/cataloguing/moveitem.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI             qw ( -utf8 );
24
use CGI             qw( -utf8 );
25
use C4::Auth        qw( get_template_and_user );
25
use C4::Auth        qw( get_template_and_user );
26
use C4::Circulation qw( barcodedecode );
26
use C4::Circulation qw( barcodedecode );
27
use C4::Output      qw( output_html_with_http_headers );
27
use C4::Output      qw( output_html_with_http_headers );
(-)a/cataloguing/plugin_launcher.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( check_cookie_auth );
22
use C4::Auth qw( check_cookie_auth );
23
23
24
use Koha::FrameworkPlugin;
24
use Koha::FrameworkPlugin;
(-)a/cataloguing/value_builder/barcode.pl (-1 / +1 lines)
Lines 29-35 use Koha::DateUtils qw( dt_from_string ); Link Here
29
29
30
use Algorithm::CheckDigits qw( CheckDigits );
30
use Algorithm::CheckDigits qw( CheckDigits );
31
31
32
use CGI      qw ( -utf8 );
32
use CGI      qw( -utf8 );
33
use C4::Auth qw( check_cookie_auth );
33
use C4::Auth qw( check_cookie_auth );
34
my $input = CGI->new;
34
my $input = CGI->new;
35
my ($auth_status) =
35
my ($auth_status) =
(-)a/cataloguing/value_builder/barcode_manual.pl (-1 / +1 lines)
Lines 27-33 use C4::Barcodes::ValueBuilder; Link Here
27
use C4::Biblio      qw( GetMarcFromKohaField );
27
use C4::Biblio      qw( GetMarcFromKohaField );
28
use Koha::DateUtils qw( dt_from_string );
28
use Koha::DateUtils qw( dt_from_string );
29
29
30
use CGI      qw ( -utf8 );
30
use CGI      qw( -utf8 );
31
use C4::Auth qw( check_cookie_auth );
31
use C4::Auth qw( check_cookie_auth );
32
my $input = CGI->new;
32
my $input = CGI->new;
33
my ($auth_status) =
33
my ($auth_status) =
(-)a/cataloguing/value_builder/callnumber-KU.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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;
(-)a/cataloguing/value_builder/callnumber.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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;
(-)a/cataloguing/value_builder/dateaccessioned.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use C4::Context;
26
use C4::Context;
27
27
(-)a/cataloguing/value_builder/marc21_field_005.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use C4::Context;
26
use C4::Context;
27
27
(-)a/cataloguing/value_builder/marc21_field_006.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/marc21_field_007.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use CGI      qw ( -utf8 );
25
use CGI      qw( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
(-)a/cataloguing/value_builder/marc21_field_008.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/marc21_field_008_authorities.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/marc21_field_008_classifications.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Auth qw( get_template_and_user );
19
use C4::Auth qw( get_template_and_user );
20
use CGI      qw ( -utf8 );
20
use CGI      qw( -utf8 );
21
use C4::Context;
21
use C4::Context;
22
22
23
use C4::Search;
23
use C4::Search;
(-)a/cataloguing/value_builder/marc21_field_245h.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use C4::Context;
26
use C4::Context;
27
27
(-)a/cataloguing/value_builder/marc21_field_260b.pl (-1 / +1 lines)
Lines 27-33 biblioitems.publishercode Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use C4::Context;
28
use C4::Context;
29
29
30
use CGI      qw ( -utf8 );
30
use CGI      qw( -utf8 );
31
use C4::Auth qw( check_cookie_auth );
31
use C4::Auth qw( check_cookie_auth );
32
use C4::Context;
32
use C4::Context;
33
33
(-)a/cataloguing/value_builder/marc21_leader.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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;
(-)a/cataloguing/value_builder/marc21_leader_authorities.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use CGI      qw ( -utf8 );
25
use CGI      qw( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
(-)a/cataloguing/value_builder/marc21_linking_section.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
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::Search qw( new_record_from_zebra );
27
use C4::Search qw( new_record_from_zebra );
(-)a/cataloguing/value_builder/marc21_orgcode.pl (-1 / +1 lines)
Lines 24-30 use Modern::Perl; Link Here
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
use CGI      qw ( -utf8 );
27
use CGI      qw( -utf8 );
28
use C4::Auth qw( check_cookie_auth );
28
use C4::Auth qw( check_cookie_auth );
29
29
30
my $input = CGI->new;
30
my $input = CGI->new;
(-)a/cataloguing/value_builder/stocknumber.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Context;
23
use C4::Context;
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
my $input = CGI->new;
26
my $input = CGI->new;
27
my ($auth_status) =
27
my ($auth_status) =
(-)a/cataloguing/value_builder/stocknumberAV.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/cataloguing/value_builder/stocknumberam123.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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;
(-)a/cataloguing/value_builder/unimarc_field_009_ppn.pl (-2 / +2 lines)
Lines 23-30 use Modern::Perl; Link Here
23
use LWP::Simple qw();
23
use LWP::Simple qw();
24
use LWP::UserAgent;
24
use LWP::UserAgent;
25
use JSON;
25
use JSON;
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
28
29
my $res;
29
my $res;
30
my $builder = sub {
30
my $builder = sub {
(-)a/cataloguing/value_builder/unimarc_field_010.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/cataloguing/value_builder/unimarc_field_100.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_100_authorities.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use C4::Auth                    qw( get_template_and_user );
23
use C4::Auth                    qw( get_template_and_user );
24
use CGI                         qw ( -utf8 );
24
use CGI                         qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
27
(-)a/cataloguing/value_builder/unimarc_field_105.pl (-1 / +1 lines)
Lines 23-29 use strict; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_106.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_110.pl (-1 / +1 lines)
Lines 23-29 use strict; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_115a.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_115b.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_116.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_117.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_120.pl (-1 / +1 lines)
Lines 23-29 use strict; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_121a.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_121b.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
24
25
use C4::Search;
25
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_122.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
24
25
use C4::Search;
25
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_123a.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
24
25
use C4::Search;
25
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_123defg.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_123i.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_123j.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124a.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124b.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124c.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124d.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124e.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124f.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_124g.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_125.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_125a.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_125b.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_126.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_126a.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_126b.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_127.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_128a.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_128b.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_128c.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_130.pl (-1 / +1 lines)
Lines 23-29 use strict; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_135a.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_140.pl (-1 / +1 lines)
Lines 23-29 use strict; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_141.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_field_181-2.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_181a.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_181b.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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 Data::Dumper;
29
use Data::Dumper;
(-)a/cataloguing/value_builder/unimarc_field_181c.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_182-2.pl (-1 / +1 lines)
Lines 21-27 use Date::Calc; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use C4::Auth                    qw( get_template_and_user );
23
use C4::Auth                    qw( get_template_and_user );
24
use CGI                         qw ( -utf8 );
24
use CGI                         qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
27
(-)a/cataloguing/value_builder/unimarc_field_182a.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_182c.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_183-2.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_183a.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_210c.pl (-1 / +1 lines)
Lines 22-28 use C4::Auth qw( get_template_and_user ); Link Here
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( pagination_bar output_html_with_http_headers );
24
use C4::Output qw( pagination_bar output_html_with_http_headers );
25
use CGI        qw ( -utf8 );
25
use CGI        qw( -utf8 );
26
use C4::Search;
26
use C4::Search;
27
use C4::Koha            qw( getnbpages );
27
use C4::Koha            qw( getnbpages );
28
use C4::AuthoritiesMarc qw( GetAuthority SearchAuthorities );
28
use C4::AuthoritiesMarc qw( GetAuthority SearchAuthorities );
(-)a/cataloguing/value_builder/unimarc_field_210c_bis.pl (-1 / +1 lines)
Lines 41-47 It need : Link Here
41
use Modern::Perl;
41
use Modern::Perl;
42
42
43
use C4::Auth qw( get_template_and_user );
43
use C4::Auth qw( get_template_and_user );
44
use CGI      qw ( -utf8 );
44
use CGI      qw( -utf8 );
45
use C4::Context;
45
use C4::Context;
46
46
47
use C4::Auth   qw( get_template_and_user );
47
use C4::Auth   qw( get_template_and_user );
(-)a/cataloguing/value_builder/unimarc_field_225a.pl (-1 / +1 lines)
Lines 42-48 use strict; Link Here
42
42
43
#use warnings; FIXME - Bug 2505
43
#use warnings; FIXME - Bug 2505
44
use C4::Auth qw( get_template_and_user );
44
use C4::Auth qw( get_template_and_user );
45
use CGI      qw ( -utf8 );
45
use CGI      qw( -utf8 );
46
use C4::Context;
46
use C4::Context;
47
47
48
use C4::Auth            qw( get_template_and_user );
48
use C4::Auth            qw( get_template_and_user );
(-)a/cataloguing/value_builder/unimarc_field_283-2.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_283a.pl (-1 / +1 lines)
Lines 23-29 use Date::Calc; Link Here
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth                    qw( get_template_and_user );
25
use C4::Auth                    qw( get_template_and_user );
26
use CGI                         qw ( -utf8 );
26
use CGI                         qw( -utf8 );
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
29
(-)a/cataloguing/value_builder/unimarc_field_325h.pl (-1 / +1 lines)
Lines 25-31 use Date::Calc; Link Here
25
25
26
use Koha::Util::FrameworkPlugin qw(wrapper);
26
use Koha::Util::FrameworkPlugin qw(wrapper);
27
use C4::Auth                    qw( get_template_and_user );
27
use C4::Auth                    qw( get_template_and_user );
28
use CGI                         qw ( -utf8 );
28
use CGI                         qw( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
31
(-)a/cataloguing/value_builder/unimarc_field_325j.pl (-1 / +1 lines)
Lines 25-31 use Date::Calc; Link Here
25
25
26
use Koha::Util::FrameworkPlugin qw(wrapper);
26
use Koha::Util::FrameworkPlugin qw(wrapper);
27
use C4::Auth                    qw( get_template_and_user );
27
use C4::Auth                    qw( get_template_and_user );
28
use CGI                         qw ( -utf8 );
28
use CGI                         qw( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
31
(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-1 / +1 lines)
Lines 21-27 use strict; Link Here
21
21
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
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::Search qw( new_record_from_zebra );
27
use C4::Search qw( new_record_from_zebra );
(-)a/cataloguing/value_builder/unimarc_field_686a.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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
25
26
use C4::Search;
26
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_leader.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
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
26
27
use C4::Search;
27
use C4::Search;
(-)a/cataloguing/value_builder/unimarc_leader_authorities.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use C4::Auth                    qw( get_template_and_user );
23
use C4::Auth                    qw( get_template_and_user );
24
use CGI                         qw ( -utf8 );
24
use CGI                         qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
27
(-)a/cataloguing/value_builder/upload.pl (-1 / +1 lines)
Lines 30-36 use Modern::Perl; Link Here
30
# the possibility to delete the uploaded file. If the field is empty, you
30
# the possibility to delete the uploaded file. If the field is empty, you
31
# can upload a new file.
31
# can upload a new file.
32
32
33
use CGI      qw ( -utf8 );
33
use CGI      qw( -utf8 );
34
use C4::Auth qw( check_cookie_auth );
34
use C4::Auth qw( check_cookie_auth );
35
use C4::Context;
35
use C4::Context;
36
my $input = CGI->new;
36
my $input = CGI->new;
(-)a/cataloguing/value_builder/validate_isbn.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth       qw( get_template_and_user );
23
use C4::Auth       qw( get_template_and_user );
24
use C4::Output     qw( output_html_with_http_headers );
24
use C4::Output     qw( output_html_with_http_headers );
(-)a/cataloguing/value_builder/validate_issn.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth       qw( get_template_and_user );
23
use C4::Auth       qw( get_template_and_user );
24
use C4::Output     qw( output_html_with_http_headers );
24
use C4::Output     qw( output_html_with_http_headers );
(-)a/cataloguing/ysearch.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 qw ( -utf8 );
28
use CGI qw( -utf8 );
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 );
(-)a/cataloguing/z3950_search.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/changelanguage.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Templates;
20
use C4::Templates;
21
use Koha::Util::Navigation;
21
use Koha::Util::Navigation;
22
22
(-)a/circ/add_message.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth    qw( get_template_and_user );
24
use C4::Auth    qw( get_template_and_user );
25
use C4::Output  qw( output_and_exit );
25
use C4::Output  qw( output_and_exit );
(-)a/circ/article-requests.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/circ/bookcount.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
use C4::Output qw( output_and_exit output_html_with_http_headers );
27
use C4::Auth   qw( get_template_and_user );
27
use C4::Auth   qw( get_template_and_user );
(-)a/circ/branchoverdues.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use C4::Context;
20
use C4::Context;
21
use CGI          qw ( -utf8 );
21
use CGI          qw( -utf8 );
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::Overdues qw( GetOverduesForBranch );
24
use C4::Overdues qw( GetOverduesForBranch );
(-)a/circ/branchtransfers.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI             qw ( -utf8 );
24
use CGI             qw( -utf8 );
25
use C4::Circulation qw( transferbook barcodedecode );
25
use C4::Circulation qw( transferbook barcodedecode );
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 );
(-)a/circ/checkout-notes.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/circ/circulation-home.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
#
17
#
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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 C4::Context;
23
use C4::Context;
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
# FIXME There are too many calls to Koha::Patrons->find in this script
25
# FIXME There are too many calls to Koha::Patrons->find in this script
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI         qw ( -utf8 );
28
use CGI         qw( -utf8 );
29
use URI::Escape qw( uri_escape_utf8 );
29
use URI::Escape qw( uri_escape_utf8 );
30
use DateTime;
30
use DateTime;
31
use DateTime::Duration;
31
use DateTime::Duration;
(-)a/circ/curbside_pickups.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use Try::Tiny;
20
use Try::Tiny;
21
use C4::Context;
21
use C4::Context;
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
(-)a/circ/del_message.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
(-)a/circ/hold-transfer-slip.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::Output   qw( output_html_with_http_headers );
22
use C4::Output   qw( output_html_with_http_headers );
23
use CGI          qw ( -utf8 );
23
use CGI          qw( -utf8 );
24
use C4::Auth     qw( get_session get_template_and_user );
24
use C4::Auth     qw( get_session get_template_and_user );
25
use C4::Reserves qw( ReserveSlip );
25
use C4::Reserves qw( ReserveSlip );
26
26
(-)a/circ/overdue.pl (-5 / +40 lines)
Lines 432-446 sub build_csv { Link Here
432
    my @lines = ();
432
    my @lines = ();
433
433
434
    # build header ...
434
    # build header ...
435
    my @keys =
435
    my @keys = qw( duedate
436
        qw ( duedate title author borrowertitle firstname surname phone barcode email address address2 zipcode city country
436
        title
437
        branchcode datelastissued itemcallnumber biblionumber borrowernumber itemnum issuedate replacementprice itemnotes_nonpublic streetnumber streettype);
437
        author
438
        borrowertitle
439
        firstname
440
        surname
441
        phone
442
        barcode
443
        email
444
        address
445
        address2
446
        zipcode
447
        city
448
        country
449
        branchcode
450
        datelastissued
451
        itemcallnumber
452
        biblionumber
453
        borrowernumber
454
        itemnum
455
        issuedate
456
        replacementprice
457
        itemnotes_nonpublic
458
        streetnumber
459
        streettype
460
    );
438
    my $csv = Text::CSV_XS->new( { formula => "empty" } );
461
    my $csv = Text::CSV_XS->new( { formula => "empty" } );
439
    $csv->combine(@keys);
462
    $csv->combine(@keys);
440
    push @lines, $csv->string();
463
    push @lines, $csv->string();
441
464
442
    my @private_keys =
465
    my @private_keys = qw(
443
        qw( borrowertitle firstname surname phone email address address2 zipcode city country streetnumber streettype );
466
        borrowertitle
467
        firstname
468
        surname
469
        phone
470
        email
471
        address
472
        address2
473
        zipcode
474
        city
475
        country
476
        streetnumber
477
        streettype
478
    );
444
479
445
    # ... and rest of report
480
    # ... and rest of report
446
    foreach my $overdue ( @{$overdues} ) {
481
    foreach my $overdue ( @{$overdues} ) {
(-)a/circ/pendingbookings.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Context;
24
use C4::Context;
25
25
(-)a/circ/pendingreserves.pl (-1 / +1 lines)
Lines 25-31 use Encode; Link Here
25
25
26
use C4::Context;
26
use C4::Context;
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use CGI        qw ( -utf8 );
28
use CGI        qw( -utf8 );
29
use C4::Auth   qw( get_template_and_user );
29
use C4::Auth   qw( get_template_and_user );
30
use C4::Items;
30
use C4::Items;
31
use Koha::Biblios;
31
use Koha::Biblios;
(-)a/circ/renew.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
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/circ/reserveratios.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI   qw ( -utf8 );
22
use CGI   qw( -utf8 );
23
use POSIX qw( ceil );
23
use POSIX qw( ceil );
24
24
25
use C4::Context;
25
use C4::Context;
(-)a/circ/returns.pl (-1 / +1 lines)
Lines 31-37 use Modern::Perl; Link Here
31
31
32
# FIXME There are weird things going on with $patron and $borrowernumber in this script
32
# FIXME There are weird things going on with $patron and $borrowernumber in this script
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw( -utf8 );
35
use DateTime;
35
use DateTime;
36
36
37
use C4::Auth        qw( get_template_and_user get_session haspermission );
37
use C4::Auth        qw( get_template_and_user get_session haspermission );
(-)a/circ/set-library.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
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 );
(-)a/circ/transfer-slip.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
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 CGI             qw ( -utf8 );
24
use CGI             qw( -utf8 );
25
use C4::Auth        qw( get_session get_template_and_user );
25
use C4::Auth        qw( get_session get_template_and_user );
26
use C4::Circulation qw( TransferSlip );
26
use C4::Circulation qw( TransferSlip );
27
27
(-)a/circ/transfers_to_send.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
# See also bug 22569.
22
# See also bug 22569.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use C4::Context;
26
use C4::Context;
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 );
(-)a/circ/transferstoreceive.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/circ/view_holdsqueue.pl (-1 / +1 lines)
Lines 22-28 This script displays items in the tmp_holdsqueue table Link Here
22
=cut
22
=cut
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI            qw ( -utf8 );
25
use CGI            qw( -utf8 );
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::HoldsQueue qw( GetHoldsQueueItems );
28
use C4::HoldsQueue qw( GetHoldsQueueItems );
(-)a/circ/waitingreserves.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output      qw( output_html_with_http_headers );
24
use C4::Output      qw( output_html_with_http_headers );
25
use C4::Auth        qw( get_template_and_user );
25
use C4::Auth        qw( get_template_and_user );
(-)a/course_reserves/add_items.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth        qw( get_template_and_user );
25
use C4::Auth        qw( get_template_and_user );
26
use C4::Circulation qw( barcodedecode );
26
use C4::Circulation qw( barcodedecode );
(-)a/course_reserves/course-details.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/course_reserves/course-reserves.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/course_reserves/course.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/course_reserves/mod_course.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Output;
24
use C4::Output;
25
use C4::Reserves;
25
use C4::Reserves;
(-)a/docs/CAS/CASProxy/examples/koha_webservice.pl (-1 / +1 lines)
Lines 42-48 binmode( STDOUT, ":encoding(UTF-8)" ); Link Here
42
use C4::Auth qw(check_api_auth);
42
use C4::Auth qw(check_api_auth);
43
use C4::Output;
43
use C4::Output;
44
use C4::Context;
44
use C4::Context;
45
use CGI qw ( -utf8 );
45
use CGI qw( -utf8 );
46
46
47
my $cgi = CGI->new;
47
my $cgi = CGI->new;
48
48
(-)a/docs/CAS/CASProxy/examples/proxy_cas.pl (-1 / +1 lines)
Lines 29-35 Link Here
29
=cut
29
=cut
30
30
31
use Modern::Perl;
31
use Modern::Perl;
32
use CGI qw ( -utf8 );
32
use CGI qw( -utf8 );
33
use Authen::CAS::Client;
33
use Authen::CAS::Client;
34
34
35
# URL Of the CAS Server
35
# URL Of the CAS Server
(-)a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl (-1 / +1 lines)
Lines 26-32 Link Here
26
=cut
26
=cut
27
27
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
(-)a/docs/CAS/CASProxy/examples/proxy_cas_data.pl (-1 / +1 lines)
Lines 31-37 This PGTIOU will allow us to retrieve the matching PGTID Link Here
31
=cut 
31
=cut 
32
32
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 qw( get );
37
use LWP::Simple qw( get );
(-)a/erm/erm.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use C4::Context;
21
use C4::Context;
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/errors/400.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/errors/401.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/errors/402.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/errors/403.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/errors/404.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/errors/500.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/help.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 43-49 use Koha::Database; Link Here
43
use Koha;
43
use Koha;
44
use Koha::DateUtils qw( dt_from_string output_pref );
44
use Koha::DateUtils qw( dt_from_string output_pref );
45
use Koha::Caches;
45
use Koha::Caches;
46
use Koha::Installer::Output qw ( say_failure );
46
use Koha::Installer::Output qw( say_failure );
47
use Koha::Plugins;
47
use Koha::Plugins;
48
48
49
use MARC::Record;
49
use MARC::Record;
(-)a/installer/install.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use diagnostics;
21
use diagnostics;
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;
25
use POSIX;
26
use HTML::FromANSI::Tiny::Bootstrap;
26
use HTML::FromANSI::Tiny::Bootstrap;
27
27
(-)a/installer/onboarding.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::InstallAuth qw( checkauth get_template_and_user );
22
use C4::InstallAuth qw( checkauth get_template_and_user );
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 Koha::Patrons;
25
use Koha::Patrons;
26
use Koha::Libraries;
26
use Koha::Libraries;
(-)a/labels/barcode-print.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
20
use C4::Auth   qw( get_template_and_user );
20
use C4::Auth   qw( get_template_and_user );
21
use C4::Output qw( output_html_with_http_headers );
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Context;
22
use C4::Context;
(-)a/labels/label-create-csv.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
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
25
26
use C4::Labels;
26
use C4::Labels;
(-)a/labels/label-create-pdf.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Creators;
24
use C4::Creators;
25
use C4::Labels;
25
use C4::Labels;
(-)a/labels/label-create-xml.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
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
25
26
use C4::Labels;
26
use C4::Labels;
(-)a/labels/label-edit-batch.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth        qw( get_template_and_user );
25
use C4::Auth        qw( get_template_and_user );
26
use C4::Circulation qw( barcodedecode );
26
use C4::Circulation qw( barcodedecode );
(-)a/labels/label-edit-layout.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
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;
25
25
26
use C4::Auth     qw( get_template_and_user );
26
use C4::Auth     qw( get_template_and_user );
(-)a/labels/label-edit-profile.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth     qw( get_template_and_user );
25
use C4::Auth     qw( get_template_and_user );
26
use C4::Output   qw( output_html_with_http_headers );
26
use C4::Output   qw( output_html_with_http_headers );
(-)a/labels/label-edit-range.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/labels/label-edit-template.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth     qw( get_template_and_user );
25
use C4::Auth     qw( get_template_and_user );
26
use C4::Output   qw( output_html_with_http_headers );
26
use C4::Output   qw( output_html_with_http_headers );
(-)a/labels/label-home.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/labels/label-item-search.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI   qw ( -utf8 );
22
use CGI   qw( -utf8 );
23
use POSIX qw( ceil );
23
use POSIX qw( ceil );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/labels/label-manage.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth     qw( get_template_and_user );
25
use C4::Auth     qw( get_template_and_user );
26
use C4::Output   qw( output_html_with_http_headers );
26
use C4::Output   qw( output_html_with_http_headers );
(-)a/labels/label-print.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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 );
(-)a/labels/spinelabel-home.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
20
use C4::Auth   qw( get_template_and_user );
20
use C4::Auth   qw( get_template_and_user );
21
use C4::Output qw( output_html_with_http_headers );
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Context;
22
use C4::Context;
(-)a/labels/spinelabel-print.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
20
use C4::Auth   qw( get_template_and_user );
20
use C4::Auth   qw( get_template_and_user );
21
use C4::Output qw( output_html_with_http_headers );
21
use C4::Output qw( output_html_with_http_headers );
22
22
(-)a/mainpage.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
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::Koha;
(-)a/members/accountline-details.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::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;
(-)a/members/alert-subscriptions.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Context;
24
use C4::Context;
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 );
(-)a/members/boraccount.pl (-1 / +1 lines)
Lines 25-31 use URI::Escape qw( uri_unescape ); 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_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
28
use CGI        qw ( -utf8 );
28
use CGI        qw( -utf8 );
29
use C4::Members;
29
use C4::Members;
30
use C4::Accounts;
30
use C4::Accounts;
31
use C4::Letters;
31
use C4::Letters;
(-)a/members/deletemem.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw( -utf8 );
27
27
28
use Try::Tiny qw( catch try );
28
use Try::Tiny qw( catch try );
29
29
(-)a/members/files.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::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 );
(-)a/members/holdshistory.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
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/members/ill-requests.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::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 JSON       qw( encode_json );
25
use JSON       qw( encode_json );
(-)a/members/mancredit.pl (-1 / +1 lines)
Lines 25-31 use Modern::Perl; 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_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
28
use CGI        qw ( -utf8 );
28
use CGI        qw( -utf8 );
29
29
30
use C4::Members;
30
use C4::Members;
31
use C4::Accounts;
31
use C4::Accounts;
(-)a/members/maninvoice.pl (-2 / +2 lines)
Lines 28-34 use URI::Escape qw( uri_escape_utf8 ); Link Here
28
28
29
use C4::Auth   qw( get_template_and_user );
29
use C4::Auth   qw( get_template_and_user );
30
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
30
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
31
use CGI        qw ( -utf8 );
31
use CGI        qw( -utf8 );
32
use C4::Members;
32
use C4::Members;
33
use C4::Accounts;
33
use C4::Accounts;
34
34
Lines 140-146 if ( $op eq 'cud-add' ) { Link Here
140
                    borrowernumber => $borrowernumber
140
                    borrowernumber => $borrowernumber
141
                },
141
                },
142
                { order_by => { -desc => 'returndate' }, rows => 1 }
142
                { order_by => { -desc => 'returndate' }, rows => 1 }
143
                )->next;
143
            )->next;
144
            $issue_id = $checkout ? $checkout->issue_id : undef;
144
            $issue_id = $checkout ? $checkout->issue_id : undef;
145
        }
145
        }
146
    }
146
    }
(-)a/members/member-flags.pl (-1 / +1 lines)
Lines 6-12 Link Here
6
6
7
use Modern::Perl;
7
use Modern::Perl;
8
8
9
use CGI        qw ( -utf8 );
9
use CGI        qw( -utf8 );
10
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 );
11
use C4::Auth   qw( get_template_and_user get_all_subpermissions get_user_subpermissions );
11
use C4::Auth   qw( get_template_and_user get_all_subpermissions get_user_subpermissions );
12
use C4::Context;
12
use C4::Context;
(-)a/members/member-password.pl (-1 / +1 lines)
Lines 9-15 use Modern::Perl; Link Here
9
use C4::Auth   qw( get_template_and_user );
9
use C4::Auth   qw( get_template_and_user );
10
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 );
11
use C4::Context;
11
use C4::Context;
12
use CGI qw ( -utf8 );
12
use CGI qw( -utf8 );
13
13
14
use Koha::Patrons;
14
use Koha::Patrons;
15
use Koha::Patron::Categories;
15
use Koha::Patron::Categories;
(-)a/members/memberentry.pl (-3 / +2 lines)
Lines 23-29 use Modern::Perl; Link Here
23
use Try::Tiny;
23
use Try::Tiny;
24
24
25
# external modules
25
# external modules
26
use CGI          qw ( -utf8 );
26
use CGI          qw( -utf8 );
27
use Scalar::Util qw( blessed );
27
use Scalar::Util qw( blessed );
28
28
29
# internal modules
29
# internal modules
Lines 301-308 if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && $guarantors_to_be_validated Link Here
301
                # If $patron's categorycode is about to change, check guarantor requirements against
301
                # If $patron's categorycode is about to change, check guarantor requirements against
302
                # the new category but keep the original $patron object intact
302
                # the new category but keep the original $patron object intact
303
                # (this clone()s the $patron)
303
                # (this clone()s the $patron)
304
                ( bless {%$patron}, ref $patron )
304
                ( bless {%$patron}, ref $patron )->categorycode($categorycode)
305
                    ->categorycode($categorycode)
306
                    ->can_be_guaranteed_by($guarantors_to_be_validated);
305
                    ->can_be_guaranteed_by($guarantors_to_be_validated);
307
            }
306
            }
308
        } else {
307
        } else {
(-)a/members/members-home.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
(-)a/members/members-update-do.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
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::Output;
23
use C4::Output;
24
use C4::Context;
24
use C4::Context;
(-)a/members/members-update.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
(-)a/members/merge-patrons.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI       qw ( -utf8 );
21
use CGI       qw( -utf8 );
22
use Try::Tiny qw( catch try );
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 );
(-)a/members/mod_debarment.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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          qw( dt_from_string );
25
use Koha::DateUtils          qw( dt_from_string );
(-)a/members/moremember.pl (-1 / +1 lines)
Lines 27-33 Link Here
27
=cut
27
=cut
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
use C4::Context;
31
use C4::Context;
32
use C4::Auth   qw( get_template_and_user );
32
use C4::Auth   qw( get_template_and_user );
33
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
33
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
(-)a/members/notices.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
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::Members;
26
use C4::Members;
27
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
27
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
28
use Koha::Patrons;
28
use Koha::Patrons;
(-)a/members/patronimage.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use CGI      qw ( -utf8 );
25
use CGI      qw( -utf8 );
26
use C4::Auth qw( check_api_auth );
26
use C4::Auth qw( check_api_auth );
27
use C4::Context;
27
use C4::Context;
28
use Koha::Patrons;
28
use Koha::Patrons;
(-)a/members/pay.pl (-1 / +1 lines)
Lines 32-38 use URI::Escape qw( uri_escape_utf8 uri_unescape ); Link Here
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;
36
use C4::Members;
37
use C4::Accounts;
37
use C4::Accounts;
38
use C4::Stats;
38
use C4::Stats;
(-)a/members/paycollect.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use URI::Escape qw( uri_escape uri_unescape );
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 );
(-)a/members/printfeercpt.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_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;
26
use C4::Letters;
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
28
28
(-)a/members/printinvoice.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_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;
26
use C4::Letters;
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
28
28
(-)a/members/printnotice.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
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_html_with_http_headers );
23
use C4::Output qw( output_and_exit_if_error output_html_with_http_headers );
24
use CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
25
use C4::Letters;
25
use C4::Letters;
26
use Koha::Account::Lines;
26
use Koha::Account::Lines;
27
27
(-)a/members/printslip.pl (-1 / +1 lines)
Lines 32-38 Link Here
32
=cut
32
=cut
33
33
34
use Modern::Perl;
34
use Modern::Perl;
35
use CGI qw ( -utf8 );
35
use CGI qw( -utf8 );
36
use C4::Context;
36
use C4::Context;
37
use C4::Auth    qw( get_session get_template_and_user );
37
use C4::Auth    qw( get_session get_template_and_user );
38
use C4::Output  qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
38
use C4::Output  qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
(-)a/members/purchase-suggestions.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Context;
24
use C4::Context;
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 );
(-)a/members/readingrec.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
26
27
use C4::Auth        qw( get_template_and_user );
27
use C4::Auth        qw( get_template_and_user );
28
use C4::Output      qw( output_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 );
(-)a/members/recallshistory.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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
23
(-)a/members/routing-lists.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
22
use C4::Output qw( output_and_exit_if_error output_and_exit 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::Members;
24
use C4::Members;
(-)a/members/setstatus.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
use Try::Tiny;
26
use Try::Tiny;
27
27
28
use CGI      qw ( -utf8 );
28
use CGI      qw( -utf8 );
29
use C4::Auth qw( checkauth );
29
use C4::Auth qw( checkauth );
30
use C4::Context;
30
use C4::Context;
31
use C4::Members;
31
use C4::Members;
(-)a/members/statistics.pl (-1 / +1 lines)
Lines 24-30 Link Here
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
26
27
use CGI      qw ( -utf8 );
27
use CGI      qw( -utf8 );
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;
(-)a/members/update-child.pl (-1 / +1 lines)
Lines 27-33 Link Here
27
=cut
27
=cut
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
use C4::Context;
31
use C4::Context;
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 output_and_exit_if_error output_and_exit );
33
use C4::Output qw( output_html_with_http_headers output_and_exit_if_error output_and_exit );
(-)a/misc/cronjobs/runreport.pl (-1 / +1 lines)
Lines 33-39 use Koha::SMTP::Servers; Link Here
33
use Getopt::Long qw( GetOptions );
33
use Getopt::Long qw( GetOptions );
34
use Pod::Usage   qw( pod2usage );
34
use Pod::Usage   qw( pod2usage );
35
use Text::CSV::Encoded;
35
use Text::CSV::Encoded;
36
use CGI       qw ( -utf8 );
36
use CGI       qw( -utf8 );
37
use Carp      qw( carp );
37
use Carp      qw( carp );
38
use Encode    qw( decode );
38
use Encode    qw( decode );
39
use JSON      qw( to_json );
39
use JSON      qw( to_json );
(-)a/offline_circ/enqueue_koc.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
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::Context;
26
use C4::Context;
(-)a/offline_circ/list.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
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::Context;
26
use C4::Context;
(-)a/offline_circ/process.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
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::Circulation qw( GetOfflineOperation ProcessOfflineOperation DeleteOfflineOperation );
25
use C4::Circulation qw( GetOfflineOperation ProcessOfflineOperation DeleteOfflineOperation );
26
26
(-)a/offline_circ/process_koc.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
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 );
(-)a/offline_circ/service.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI             qw ( -utf8 );
23
use CGI             qw( -utf8 );
24
use C4::Auth        qw( check_api_auth check_cookie_auth );
24
use C4::Auth        qw( check_api_auth check_cookie_auth );
25
use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
25
use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
26
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
(-)a/opac/errors/400.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/errors/401.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/errors/402.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/errors/403.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/errors/404.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/errors/500.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI        qw ( -utf8 );
19
use CGI        qw( -utf8 );
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;
(-)a/opac/external/overdrive/auth.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use URI;
23
use URI;
24
use URI::Escape qw( uri_escape );
24
use URI::Escape qw( uri_escape );
25
use Koha::Logger;
25
use Koha::Logger;
(-)a/opac/ilsdi.pl (-1 / +1 lines)
Lines 26-32 use C4::Context; Link Here
26
26
27
use List::MoreUtils qw( any );
27
use List::MoreUtils qw( any );
28
use XML::Simple     qw( XMLout );
28
use XML::Simple     qw( XMLout );
29
use CGI             qw ( -utf8 );
29
use CGI             qw( -utf8 );
30
use Net::Netmask;
30
use Net::Netmask;
31
31
32
=head1 DLF ILS-DI for Koha
32
=head1 DLF ILS-DI for Koha
(-)a/opac/maintenance.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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
23
(-)a/opac/opac-ISBDdetail.pl (-1 / +1 lines)
Lines 43-49 use Modern::Perl; Link Here
43
use C4::Auth qw( get_template_and_user );
43
use C4::Auth qw( get_template_and_user );
44
use C4::Context;
44
use C4::Context;
45
use C4::Output qw( parametrized_url output_html_with_http_headers redirect_if_opac_suppressed );
45
use C4::Output qw( parametrized_url output_html_with_http_headers redirect_if_opac_suppressed );
46
use CGI        qw ( -utf8 );
46
use CGI        qw( -utf8 );
47
use C4::Biblio qw(
47
use C4::Biblio qw(
48
    CountItemsIssued
48
    CountItemsIssued
49
    GetISBDView
49
    GetISBDView
(-)a/opac/opac-MARCdetail.pl (-1 / +1 lines)
Lines 47-53 use Modern::Perl; Link Here
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::Output qw( parametrized_url output_html_with_http_headers redirect_if_opac_suppressed );
49
use C4::Output qw( parametrized_url output_html_with_http_headers redirect_if_opac_suppressed );
50
use CGI        qw ( -utf8 );
50
use CGI        qw( -utf8 );
51
use C4::Biblio qw(
51
use C4::Biblio qw(
52
    CountItemsIssued
52
    CountItemsIssued
53
    GetAuthorisedValueDesc
53
    GetAuthorisedValueDesc
(-)a/opac/opac-account.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Members;
23
use C4::Members;
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-addbybiblionumber.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
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
26
(-)a/opac/opac-alert-subscribe.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
(-)a/opac/opac-alert-subscriptions.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::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 );
(-)a/opac/opac-article-request-cancel.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Output;
24
use C4::Output;
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/opac/opac-authorities-home.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI          qw ( -utf8 );
22
use CGI          qw( -utf8 );
23
use URI::Escape  qw( uri_escape_utf8 );
23
use URI::Escape  qw( uri_escape_utf8 );
24
use Array::Utils qw(intersect);
24
use Array::Utils qw(intersect);
25
25
(-)a/opac/opac-authoritiesdetail.pl (-1 / +1 lines)
Lines 44-50 use C4::Context; Link Here
44
use C4::Languages;
44
use C4::Languages;
45
use C4::Output          qw( output_html_with_http_headers );
45
use C4::Output          qw( output_html_with_http_headers );
46
use C4::AuthoritiesMarc qw( GetAuthority BuildSummary GetTagsLabels GenerateHierarchy );
46
use C4::AuthoritiesMarc qw( GetAuthority BuildSummary GetTagsLabels GenerateHierarchy );
47
use CGI                 qw ( -utf8 );
47
use CGI                 qw( -utf8 );
48
use C4::Koha;
48
use C4::Koha;
49
49
50
use Koha::Authorities;
50
use Koha::Authorities;
(-)a/opac/opac-basket.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Koha;
22
use C4::Koha;
23
use C4::Biblio qw(
23
use C4::Biblio qw(
(-)a/opac/opac-blocked.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_with_http_headers );
23
use C4::Output qw( output_with_http_headers );
24
use C4::Context;
24
use C4::Context;
(-)a/opac/opac-browse.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
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;
(-)a/opac/opac-browser.pl (-1 / +1 lines)
Lines 28-34 use Modern::Perl; 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::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
use CGI        qw ( -utf8 );
31
use CGI        qw( -utf8 );
32
32
33
my $query = CGI->new;
33
my $query = CGI->new;
34
34
(-)a/opac/opac-changelanguage.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Templates;
20
use C4::Templates;
21
use Koha::Util::Navigation;
21
use Koha::Util::Navigation;
22
22
(-)a/opac/opac-course-details.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-course-reserves.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-curbside-pickups.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use Try::Tiny;
20
use Try::Tiny;
21
use C4::Members;
21
use C4::Members;
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI             qw ( -utf8 );
24
use CGI             qw( -utf8 );
25
use C4::Acquisition qw( SearchOrders );
25
use C4::Acquisition qw( SearchOrders );
26
use C4::Auth        qw( get_template_and_user get_session );
26
use C4::Auth        qw( get_template_and_user get_session );
27
use C4::Koha        qw(
27
use C4::Koha        qw(
(-)a/opac/opac-dismiss-message.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/opac/opac-downloadcart.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
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 );
(-)a/opac/opac-downloadshelf.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Biblio qw( GetFrameworkCode GetISBDView );
25
use C4::Biblio qw( GetFrameworkCode GetISBDView );
(-)a/opac/opac-export.pl (-1 / +1 lines)
Lines 26-32 use C4::Biblio qw( Link Here
26
    GetFrameworkCode
26
    GetFrameworkCode
27
    GetISBDView
27
    GetISBDView
28
);
28
);
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
use C4::Auth;
30
use C4::Auth;
31
use C4::Ris qw( marc2ris );
31
use C4::Ris qw( marc2ris );
32
use Koha::Biblios;
32
use Koha::Biblios;
(-)a/opac/opac-holdshistory.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
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/opac/opac-ics.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
use Data::ICal;
25
use Data::ICal;
26
use Data::ICal::Entry::Event;
26
use Data::ICal::Entry::Event;
27
use DateTime;
27
use DateTime;
(-)a/opac/opac-illrequests-unauthenticated.pl (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use JSON qw( decode_json );
5
use JSON qw( decode_json );
6
6
7
use CGI         qw ( -utf8 );
7
use CGI         qw( -utf8 );
8
use C4::Auth    qw( get_template_and_user );
8
use C4::Auth    qw( get_template_and_user );
9
use C4::Output  qw( output_html_with_http_headers );
9
use C4::Output  qw( output_html_with_http_headers );
10
use URI::Escape qw( uri_unescape );
10
use URI::Escape qw( uri_unescape );
(-)a/opac/opac-illrequests.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use JSON qw( encode_json );
22
use JSON qw( encode_json );
23
23
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Output     qw( output_html_with_http_headers );
27
use C4::Output     qw( output_html_with_http_headers );
(-)a/opac/opac-image.pl (-1 / +1 lines)
Lines 25-31 Link Here
25
25
26
use Modern::Perl;
26
use Modern::Perl;
27
27
28
use CGI qw ( -utf8 );
28
use CGI qw( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use Koha::Biblios;
30
use Koha::Biblios;
31
use Koha::CoverImages;
31
use Koha::CoverImages;
(-)a/opac/opac-imageviewer.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/opac/opac-issue-note.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Koha;
23
use C4::Koha;
24
use C4::Context;
24
use C4::Context;
25
use C4::Scrubber;
25
use C4::Scrubber;
(-)a/opac/opac-library.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::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 );
(-)a/opac/opac-main.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Quotes;
24
use Koha::Quotes;
(-)a/opac/opac-memberentry.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI             qw ( -utf8 );
20
use CGI             qw( -utf8 );
21
use Digest::MD5     qw( md5_base64 md5_hex );
21
use Digest::MD5     qw( md5_base64 md5_hex );
22
use JSON            qw( to_json );
22
use JSON            qw( to_json );
23
use List::MoreUtils qw( any each_array uniq );
23
use List::MoreUtils qw( any each_array uniq );
(-)a/opac/opac-messaging.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
(-)a/opac/opac-modrequest-suspend.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use C4::Output;
21
use C4::Output;
22
use C4::Reserves qw( SuspendAll );
22
use C4::Reserves qw( SuspendAll );
23
use C4::Auth     qw( get_template_and_user );
23
use C4::Auth     qw( get_template_and_user );
(-)a/opac/opac-modrequest.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw( -utf8 );
27
use C4::Output;
27
use C4::Output;
28
use C4::Auth qw( get_template_and_user );
28
use C4::Auth qw( get_template_and_user );
29
use Koha::Holds;
29
use Koha::Holds;
(-)a/opac/opac-mymessages.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
(-)a/opac/opac-overdrive-search.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
(-)a/opac/opac-page.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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 C4::Languages qw( getlanguage );
23
use C4::Languages qw( getlanguage );
(-)a/opac/opac-passwd.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
25
use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
26
use C4::Context;
26
use C4::Context;
(-)a/opac/opac-patron-image.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Members;
22
use C4::Members;
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
24
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use Koha::Patron::Images;
26
use Koha::Patron::Images;
(-)a/opac/opac-privacy.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
(-)a/opac/opac-ratings.pl (-1 / +1 lines)
Lines 26-32 note: there is currently no 'delete rating' functionality in this script Link Here
26
=cut
26
=cut
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
30
31
use C4::Auth qw( checkauth );
31
use C4::Auth qw( checkauth );
32
use C4::Context;
32
use C4::Context;
(-)a/opac/opac-readingrecord.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Biblio;
23
use C4::Biblio;
(-)a/opac/opac-recall.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
(-)a/opac/opac-recalls.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI        qw ( -utf8 );
20
use CGI        qw( -utf8 );
21
use Encode     qw( encode );
21
use Encode     qw( encode );
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/opac/opac-registration-verify.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use Try::Tiny;
21
use Try::Tiny;
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
(-)a/opac/opac-renew.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use CGI             qw ( -utf8 );
25
use CGI             qw( -utf8 );
26
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
26
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
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;
(-)a/opac/opac-reportproblem.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI       qw ( -utf8 );
21
use CGI       qw( -utf8 );
22
use Try::Tiny qw( catch try );
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 );
(-)a/opac/opac-request-article.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/opac/opac-reserve.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI             qw ( -utf8 );
23
use CGI             qw( -utf8 );
24
use C4::Auth        qw( get_template_and_user );
24
use C4::Auth        qw( get_template_and_user );
25
use C4::Koha        qw( getitemtypeimagelocation getitemtypeimagesrc );
25
use C4::Koha        qw( getitemtypeimagelocation getitemtypeimagesrc );
26
use C4::Circulation qw( GetBranchItemRule );
26
use C4::Circulation qw( GetBranchItemRule );
(-)a/opac/opac-reset-password.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
22
use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
23
use C4::Context;
23
use C4::Context;
(-)a/opac/opac-review.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Scrubber;
24
use C4::Scrubber;
(-)a/opac/opac-routing-lists.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Members;
20
use C4::Members;
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 );
(-)a/opac/opac-search-history.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Search::History;
26
use C4::Search::History;
(-)a/opac/opac-sendbasket.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use Encode;
23
use Encode;
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/opac/opac-sendshelf.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use Encode;
23
use Encode;
24
use Carp      qw( carp );
24
use Carp      qw( carp );
25
use Try::Tiny qw( catch try );
25
use Try::Tiny qw( catch try );
(-)a/opac/opac-serial-issues.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Serials
24
use C4::Serials
25
    qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
25
    qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
(-)a/opac/opac-shareshelf.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use constant KEYLENGTH   => 10;
22
use constant KEYLENGTH   => 10;
23
use constant SHELVES_URL => '/cgi-bin/koha/opac-shelves.pl?display=privateshelves&viewshelf=';
23
use constant SHELVES_URL => '/cgi-bin/koha/opac-shelves.pl?display=privateshelves&viewshelf=';
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
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;
(-)a/opac/opac-shelves.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI                       qw ( -utf8 );
22
use CGI                       qw( -utf8 );
23
use C4::Auth                  qw( get_template_and_user );
23
use C4::Auth                  qw( get_template_and_user );
24
use C4::Biblio                qw( GetBiblioData GetFrameworkCode );
24
use C4::Biblio                qw( GetBiblioData GetFrameworkCode );
25
use C4::External::BakerTaylor qw( image_url link_url );
25
use C4::External::BakerTaylor qw( image_url link_url );
(-)a/opac/opac-showmarc.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
# standard or CPAN modules used
22
# standard or CPAN modules used
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use Encode;
24
use Encode;
25
25
26
# Koha modules used
26
# Koha modules used
(-)a/opac/opac-showreviews.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha qw(
25
use C4::Koha qw(
26
    GetNormalizedEAN
26
    GetNormalizedEAN
(-)a/opac/opac-suggestions.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use Encode;
21
use Encode;
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Members;
23
use C4::Members;
(-)a/opac/opac-tags.pl (-1 / +1 lines)
Lines 31-37 C4::Scrubber is used to remove all markup content from the sumitted text. Link Here
31
31
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw( -utf8 );
35
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
35
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
36
use Array::Utils qw( array_minus );
36
use Array::Utils qw( array_minus );
37
37
(-)a/opac/opac-tags_subject.pl (-1 / +1 lines)
Lines 28-34 use Modern::Perl; 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::Output qw( output_html_with_http_headers );
30
use C4::Output qw( output_html_with_http_headers );
31
use CGI        qw ( -utf8 );
31
use CGI        qw( -utf8 );
32
32
33
my $query = CGI->new;
33
my $query = CGI->new;
34
34
(-)a/opac/opac-topissues.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
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::Context;
25
use C4::Context;
26
use C4::Search;
26
use C4::Search;
(-)a/opac/opac-user.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use URI;
22
use URI;
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/opac/opac-virtual-card.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::Libraries;
25
use Koha::Libraries;
(-)a/opac/sci/sci-main.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Auth        qw( get_template_and_user );
22
use C4::Auth        qw( get_template_and_user );
23
use C4::Circulation qw( AddReturn );
23
use C4::Circulation qw( AddReturn );
(-)a/opac/sco/help.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
21
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
25
26
use C4::Auth   qw( in_iprange get_template_and_user );
26
use C4::Auth   qw( in_iprange 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/opac/sco/printslip.pl (-1 / +1 lines)
Lines 26-32 It is called from sco-main.pl Link Here
26
=cut
26
=cut
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
use C4::Context;
30
use C4::Context;
31
use C4::Auth    qw( in_iprange get_session get_template_and_user );
31
use C4::Auth    qw( in_iprange get_session get_template_and_user );
32
use C4::Output  qw( output_html_with_http_headers );
32
use C4::Output  qw( output_html_with_http_headers );
(-)a/opac/sco/sco-main.pl (-1 / +1 lines)
Lines 30-36 Link Here
30
30
31
use Modern::Perl;
31
use Modern::Perl;
32
32
33
use CGI qw ( -utf8 );
33
use CGI qw( -utf8 );
34
34
35
use C4::Auth        qw( in_iprange get_template_and_user checkpw );
35
use C4::Auth        qw( in_iprange get_template_and_user checkpw );
36
use C4::Circulation qw( barcodedecode AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
36
use C4::Circulation qw( barcodedecode AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
(-)a/opac/svc/auth/googleopenidconnect (-1 / +1 lines)
Lines 31-37 Link Here
31
#
31
#
32
32
33
use Modern::Perl;
33
use Modern::Perl;
34
use CGI      qw ( -utf8 escape );
34
use CGI      qw( -utf8 escape );
35
use C4::Auth qw{ checkauth get_session get_template_and_user };
35
use C4::Auth qw{ checkauth get_session get_template_and_user };
36
use C4::Context;
36
use C4::Context;
37
use C4::Output qw{ output_html_with_http_headers };
37
use C4::Output qw{ output_html_with_http_headers };
(-)a/opac/svc/overdrive (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI        qw ( -utf8 );
22
use CGI        qw( -utf8 );
23
use JSON       qw(encode_json);
23
use JSON       qw(encode_json);
24
use C4::Auth   qw( checkauth );
24
use C4::Auth   qw( checkauth );
25
use C4::Output qw( output_with_http_headers );
25
use C4::Output qw( output_with_http_headers );
(-)a/opac/svc/report (-1 / +1 lines)
Lines 27-33 use C4::Output qw(output_with_http_headers); Link Here
27
use C4::Reports::Guided qw( execute_query );
27
use C4::Reports::Guided qw( execute_query );
28
use Koha::Reports;
28
use Koha::Reports;
29
use JSON;
29
use JSON;
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
31
32
use Koha::Caches;
32
use Koha::Caches;
33
33
(-)a/opac/svc/shelfbrowser.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 qw ( -utf8 );
4
use CGI qw( -utf8 );
5
5
6
use C4::Auth qw( get_template_and_user );
6
use C4::Auth qw( get_template_and_user );
7
use C4::Context;
7
use C4::Context;
(-)a/opac/svc/suggestion (-1 / +1 lines)
Lines 56-62 use Modern::Perl; Link Here
56
use C4::Auth qw( get_template_and_user );
56
use C4::Auth qw( get_template_and_user );
57
use C4::Context;
57
use C4::Context;
58
use C4::Output qw( output_html_with_http_headers );
58
use C4::Output qw( output_html_with_http_headers );
59
use CGI        qw ( -utf8 );
59
use CGI        qw( -utf8 );
60
use JSON;
60
use JSON;
61
use Koha::SuggestionEngine;
61
use Koha::SuggestionEngine;
62
62
(-)a/opac/tracklinks.pl (-1 / +1 lines)
Lines 26-32 use C4::Output qw( output_error ); Link Here
26
use Koha::Biblios;
26
use Koha::Biblios;
27
use Koha::Items;
27
use Koha::Items;
28
use Koha::Linktracker;
28
use Koha::Linktracker;
29
use CGI             qw ( -utf8 );
29
use CGI             qw( -utf8 );
30
use List::MoreUtils qw( any );
30
use List::MoreUtils qw( any );
31
31
32
my $cgi          = CGI->new;
32
my $cgi          = CGI->new;
(-)a/opac/unapi (-1 / +1 lines)
Lines 36-42 an XML format such as OAI DC, RSS2, MARCXML, or MODS. Link Here
36
36
37
=cut
37
=cut
38
38
39
use CGI qw ( -utf8 );
39
use CGI qw( -utf8 );
40
use C4::Context;
40
use C4::Context;
41
use C4::Biblio qw( GetXmlBiblio );
41
use C4::Biblio qw( GetXmlBiblio );
42
use Koha::XSLT::Base;
42
use Koha::XSLT::Base;
(-)a/patron_lists/add-modify.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth           qw( get_template_and_user );
24
use C4::Auth           qw( get_template_and_user );
25
use C4::Output         qw( output_html_with_http_headers );
25
use C4::Output         qw( output_html_with_http_headers );
(-)a/patron_lists/delete.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
(-)a/patron_lists/list.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth           qw( get_template_and_user );
24
use C4::Auth           qw( get_template_and_user );
25
use C4::Output         qw( output_html_with_http_headers );
25
use C4::Output         qw( output_html_with_http_headers );
(-)a/patron_lists/lists.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth           qw( get_template_and_user );
24
use C4::Auth           qw( get_template_and_user );
25
use C4::Output         qw( output_html_with_http_headers );
25
use C4::Output         qw( output_html_with_http_headers );
(-)a/patron_lists/patrons.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth           qw( get_template_and_user );
24
use C4::Auth           qw( get_template_and_user );
25
use C4::Output         qw( output_html_with_http_headers );
25
use C4::Output         qw( output_html_with_http_headers );
(-)a/patroncards/create-pdf.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use Graphics::Magick;
23
use Graphics::Magick;
24
use XML::Simple qw( XMLin );
24
use XML::Simple qw( XMLin );
(-)a/patroncards/edit-batch.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use autouse 'Data::Dumper' => qw(Dumper);
24
use autouse 'Data::Dumper' => qw(Dumper);
25
25
26
use C4::Auth     qw( get_template_and_user );
26
use C4::Auth     qw( get_template_and_user );
(-)a/patroncards/edit-layout.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI         qw ( -utf8 );
23
use CGI         qw( -utf8 );
24
use XML::Simple qw( XMLin XMLout );
24
use XML::Simple qw( XMLin XMLout );
25
use autouse 'Data::Dumper' => qw(Dumper);
25
use autouse 'Data::Dumper' => qw(Dumper);
26
26
(-)a/patroncards/edit-profile.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth          qw( get_template_and_user );
25
use C4::Auth          qw( get_template_and_user );
26
use C4::Output        qw( output_html_with_http_headers );
26
use C4::Output        qw( output_html_with_http_headers );
(-)a/patroncards/edit-template.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use autouse 'Data::Dumper' => qw(Dumper);
24
use autouse 'Data::Dumper' => qw(Dumper);
25
25
26
use C4::Auth     qw( get_template_and_user );
26
use C4::Auth     qw( get_template_and_user );
(-)a/patroncards/home.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
24
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
(-)a/patroncards/image-manage.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw( -utf8 );
6
use Graphics::Magick;
6
use Graphics::Magick;
7
7
8
use C4::Context;
8
use C4::Context;
(-)a/patroncards/manage.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use autouse 'Data::Dumper' => qw(Dumper);
24
use autouse 'Data::Dumper' => qw(Dumper);
25
25
26
use C4::Auth     qw( get_template_and_user );
26
use C4::Auth     qw( get_template_and_user );
(-)a/patroncards/print.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
25
use C4::Auth     qw( get_template_and_user );
25
use C4::Auth     qw( get_template_and_user );
(-)a/plugins/plugins-enable.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth qw( check_cookie_auth );
23
use C4::Auth qw( check_cookie_auth );
(-)a/plugins/plugins-home.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use JSON        qw( from_json );
24
use JSON        qw( from_json );
25
use LWP::Simple qw( get );
25
use LWP::Simple qw( get );
(-)a/plugins/plugins-uninstall.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Archive::Extract;
20
use Archive::Extract;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
(-)a/plugins/plugins-upload.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Archive::Extract;
21
use Archive::Extract;
22
use CGI        qw ( -utf8 );
22
use CGI        qw( -utf8 );
23
use List::Util qw( any );
23
use List::Util qw( any );
24
use Mojo::UserAgent;
24
use Mojo::UserAgent;
25
use File::Temp;
25
use File::Temp;
(-)a/plugins/run.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use Koha::Plugins::Handler;
24
use Koha::Plugins::Handler;
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/pos/printreceipt.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
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 CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
25
use Koha::Account::Lines;
25
use Koha::Account::Lines;
26
use Koha::Notice::Templates;
26
use Koha::Notice::Templates;
27
27
(-)a/preservation/home.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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
23
(-)a/preservation/print_slip.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Context;
20
use C4::Context;
21
use C4::Auth   qw( get_template_and_user );
21
use C4::Auth   qw( get_template_and_user );
22
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
22
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
(-)a/recalls/recall_pickup_slip.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/recalls/recalls_old_queue.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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::BiblioFrameworks;
23
use Koha::BiblioFrameworks;
(-)a/recalls/recalls_overdue.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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::BiblioFrameworks;
23
use Koha::BiblioFrameworks;
(-)a/recalls/recalls_queue.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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::BiblioFrameworks;
23
use Koha::BiblioFrameworks;
(-)a/recalls/recalls_to_pull.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI             qw ( -utf8 );
20
use CGI             qw( -utf8 );
21
use List::MoreUtils qw( uniq );
21
use List::MoreUtils qw( uniq );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
(-)a/recalls/recalls_waiting.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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::Recalls;
23
use Koha::Recalls;
(-)a/recalls/request.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
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 C4::Search;
23
use C4::Search;
(-)a/reports/acquisitions_stats.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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::Reports qw( GetDelimiterChoices );
25
use C4::Reports qw( GetDelimiterChoices );
26
use C4::Output  qw( output_html_with_http_headers );
26
use C4::Output  qw( output_html_with_http_headers );
(-)a/reports/bor_issues_top.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::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;
(-)a/reports/borrowers_out.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
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::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 );
(-)a/reports/borrowers_stats.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/reports/cat_issues_top.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output  qw( output_html_with_http_headers );
24
use C4::Output  qw( output_html_with_http_headers );
25
use C4::Koha    qw( GetAuthorisedValues );
25
use C4::Koha    qw( GetAuthorisedValues );
(-)a/reports/catalog_by_itemtype.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
25
(-)a/reports/catalogue_out.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
(-)a/reports/catalogue_stats.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output  qw( output_html_with_http_headers );
24
use C4::Output  qw( output_html_with_http_headers );
25
use C4::Koha    qw( GetAuthorisedValues );
25
use C4::Koha    qw( GetAuthorisedValues );
(-)a/reports/dictionary.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
use Modern::Perl;
19
use Modern::Perl;
20
use C4::Auth   qw( get_template_and_user );
20
use C4::Auth   qw( get_template_and_user );
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Output qw( output_html_with_http_headers );
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Reports::Guided
23
use C4::Reports::Guided
24
    qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas );
24
    qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas );
(-)a/reports/issues_avg_stats.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output  qw( output_html_with_http_headers );
24
use C4::Output  qw( output_html_with_http_headers );
25
use C4::Reports qw( GetDelimiterChoices );
25
use C4::Reports qw( GetDelimiterChoices );
(-)a/reports/issues_stats.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
(-)a/reports/itemslost.pl (-1 / +1 lines)
Lines 26-32 This script displays lost items. Link Here
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
28
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::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
32
use Text::CSV::Encoded;
32
use Text::CSV::Encoded;
(-)a/reports/reports-home.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
24
(-)a/reports/reserves_stats.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth qw( get_template_and_user );
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
(-)a/reports/serials_stats.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw( get_template_and_user );
21
use C4::Auth qw( get_template_and_user );
22
use CGI      qw ( -utf8 );
22
use CGI      qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output  qw( output_html_with_http_headers );
24
use C4::Output  qw( output_html_with_http_headers );
25
use C4::Reports qw( GetDelimiterChoices );
25
use C4::Reports qw( GetDelimiterChoices );
(-)a/reserve/modrequest.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use URI;
26
use URI;
27
use List::MoreUtils qw( uniq );
27
use List::MoreUtils qw( uniq );
28
use Try::Tiny;
28
use Try::Tiny;
(-)a/reserve/modrequest_suspendall.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
22
# along with Koha; if not, see <https://www.gnu.org/licenses>.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use C4::Output;
26
use C4::Output;
27
use C4::Reserves qw( SuspendAll );
27
use C4::Reserves qw( SuspendAll );
28
use C4::Auth     qw( checkauth );
28
use C4::Auth     qw( checkauth );
(-)a/reserve/placerequest.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use URI;
26
use URI;
27
use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
27
use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
28
use C4::Auth     qw( checkauth );
28
use C4::Auth     qw( checkauth );
(-)a/reserve/request.pl (-3 / +2 lines)
Lines 27-33 script to place reserves/requests Link Here
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
use CGI             qw ( -utf8 );
30
use CGI             qw( -utf8 );
31
use List::MoreUtils qw( uniq );
31
use List::MoreUtils qw( uniq );
32
use Date::Calc      qw( Date_to_Days );
32
use Date::Calc      qw( Date_to_Days );
33
use C4::Output      qw( output_html_with_http_headers );
33
use C4::Output      qw( output_html_with_http_headers );
Lines 341-348 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
341
341
342
    if ( $patron && $multi_hold ) {
342
    if ( $patron && $multi_hold ) {
343
        my @multi_pickup_locations =
343
        my @multi_pickup_locations =
344
            Koha::Biblios->search( { biblionumber => \@biblionumbers } )
344
            Koha::Biblios->search( { biblionumber => \@biblionumbers } )->pickup_locations( { patron => $patron } )
345
            ->pickup_locations( { patron => $patron } )
346
            ->as_list;
345
            ->as_list;
347
        $template->param( multi_pickup_locations => \@multi_pickup_locations );
346
        $template->param( multi_pickup_locations => \@multi_pickup_locations );
348
    }
347
    }
(-)a/reviews/reviewswaiting.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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( pagination_bar output_html_with_http_headers );
22
use C4::Output qw( pagination_bar output_html_with_http_headers );
23
use C4::Context;
23
use C4::Context;
(-)a/rotating_collections/addItems.pl (-1 / +1 lines)
Lines 26-32 use C4::RotatingCollections; Link Here
26
26
27
use Koha::Items;
27
use Koha::Items;
28
28
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
30
31
my $query = CGI->new;
31
my $query = CGI->new;
32
my $op    = $query->param('op') || q{};
32
my $op    = $query->param('op') || q{};
(-)a/rotating_collections/editCollections.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
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 );
(-)a/rotating_collections/rotatingCollections.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
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 );
(-)a/rotating_collections/transferCollection.pl (-1 / +1 lines)
Lines 23-29 use C4::Auth qw( get_template_and_user ); Link Here
23
use C4::Context;
23
use C4::Context;
24
use C4::RotatingCollections;
24
use C4::RotatingCollections;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw( -utf8 );
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
29
29
(-)a/serials/acqui-search-result.pl (-1 / +1 lines)
Lines 41-47 acqui-search-result.pl Link Here
41
use Modern::Perl;
41
use Modern::Perl;
42
use C4::Auth        qw( get_template_and_user );
42
use C4::Auth        qw( get_template_and_user );
43
use C4::Output      qw( output_html_with_http_headers );
43
use C4::Output      qw( output_html_with_http_headers );
44
use CGI             qw ( -utf8 );
44
use CGI             qw( -utf8 );
45
use C4::Acquisition qw( SearchOrders );
45
use C4::Acquisition qw( SearchOrders );
46
use Koha::DateUtils qw( output_pref );
46
use Koha::DateUtils qw( output_pref );
47
47
(-)a/serials/acqui-search.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI        qw ( -utf8 );
21
use CGI        qw( -utf8 );
22
use C4::Auth   qw( get_template_and_user );
22
use C4::Auth   qw( get_template_and_user );
23
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output qw( output_html_with_http_headers );
24
24
(-)a/serials/checkexpiration.pl (-1 / +1 lines)
Lines 42-48 The date to filter on. Link Here
42
=cut
42
=cut
43
43
44
use Modern::Perl;
44
use Modern::Perl;
45
use CGI         qw ( -utf8 );
45
use CGI         qw( -utf8 );
46
use C4::Auth    qw( get_template_and_user );
46
use C4::Auth    qw( get_template_and_user );
47
use C4::Serials qw( SearchSubscriptions GetExpirationDate );
47
use C4::Serials qw( SearchSubscriptions GetExpirationDate );
48
use C4::Output  qw( output_html_with_http_headers );
48
use C4::Output  qw( output_html_with_http_headers );
(-)a/serials/claims.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI         qw ( -utf8 );
21
use CGI         qw( -utf8 );
22
use C4::Auth    qw( get_template_and_user );
22
use C4::Auth    qw( get_template_and_user );
23
use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClaim can_claim_subscription );
23
use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClaim can_claim_subscription );
24
use C4::Output  qw( output_html_with_http_headers );
24
use C4::Output  qw( output_html_with_http_headers );
(-)a/serials/create-numberpattern.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Numberpattern qw(
23
use C4::Serials::Numberpattern qw(
24
    AddSubscriptionNumberpattern
24
    AddSubscriptionNumberpattern
(-)a/serials/lateissues-export.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw( -utf8 );
20
use C4::Auth;
20
use C4::Auth;
21
use C4::Serials qw( GetLateOrMissingIssues updateClaim );
21
use C4::Serials qw( GetLateOrMissingIssues updateClaim );
22
use C4::Output;
22
use C4::Output;
(-)a/serials/reorder_members.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# where the hierarchical order can be changed on the fly and a routing list can be
19
# where the hierarchical order can be changed on the fly and a routing list can be
20
# printed out
20
# printed out
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI         qw ( -utf8 );
22
use CGI         qw( -utf8 );
23
use C4::Auth    qw( checkauth );
23
use C4::Auth    qw( checkauth );
24
use C4::Serials qw( reorder_members );
24
use C4::Serials qw( reorder_members );
25
25
(-)a/serials/routing-preview.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# lets one print out routing slip and create (in this instance) the hierarchy
19
# lets one print out routing slip and create (in this instance) the hierarchy
20
# of reserves for the serial
20
# of reserves for the serial
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
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 );
25
use C4::Output   qw( output_html_with_http_headers );
25
use C4::Output   qw( output_html_with_http_headers );
(-)a/serials/routing.pl (-1 / +1 lines)
Lines 26-32 printed out Link Here
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use Try::Tiny;
28
use Try::Tiny;
29
use CGI qw ( -utf8 );
29
use CGI qw( -utf8 );
30
use C4::Koha;
30
use C4::Koha;
31
use C4::Auth   qw( get_template_and_user );
31
use C4::Auth   qw( get_template_and_user );
32
use C4::Output qw( output_and_exit output_html_with_http_headers );
32
use C4::Output qw( output_and_exit output_html_with_http_headers );
(-)a/serials/serials-collection.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
20
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::Serials
24
use C4::Serials
25
    qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
25
    qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
(-)a/serials/serials-edit.pl (-1 / +1 lines)
Lines 62-68 op can be : Link Here
62
=cut
62
=cut
63
63
64
use Modern::Perl;
64
use Modern::Perl;
65
use CGI qw ( -utf8 );
65
use CGI qw( -utf8 );
66
use Encode;
66
use Encode;
67
use C4::Auth   qw( get_template_and_user haspermission );
67
use C4::Auth   qw( get_template_and_user haspermission );
68
use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToXml );
68
use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToXml );
(-)a/serials/serials-home.pl (-1 / +1 lines)
Lines 28-34 this script is the main page for serials/ Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
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::Context;
33
use C4::Context;
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
(-)a/serials/serials-search.pl (-1 / +1 lines)
Lines 28-34 this script is the search page for serials Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
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::Context;
33
use C4::Context;
34
use C4::Output  qw( output_html_with_http_headers );
34
use C4::Output  qw( output_html_with_http_headers );
(-)a/serials/showpredictionpattern.pl (-1 / +1 lines)
Lines 30-36 publication date, based on frequency and first publication date. Link Here
30
30
31
use Modern::Perl;
31
use Modern::Perl;
32
32
33
use CGI         qw ( -utf8 );
33
use CGI         qw( -utf8 );
34
use Date::Calc  qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days );
34
use Date::Calc  qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days );
35
use C4::Auth    qw( get_template_and_user );
35
use C4::Auth    qw( get_template_and_user );
36
use C4::Output  qw( output_html_with_http_headers );
36
use C4::Output  qw( output_html_with_http_headers );
(-)a/serials/subscription-add.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI        qw ( -utf8 );
20
use CGI        qw( -utf8 );
21
use Date::Calc qw( Add_Delta_Days Add_Delta_YM );
21
use Date::Calc qw( Add_Delta_Days Add_Delta_YM );
22
use C4::Koha   qw( GetAuthorisedValues );
22
use C4::Koha   qw( GetAuthorisedValues );
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
(-)a/serials/subscription-bib-search.pl (-1 / +1 lines)
Lines 47-53 to multipage gestion. Link Here
47
47
48
use Modern::Perl;
48
use Modern::Perl;
49
49
50
use CGI      qw ( -utf8 );
50
use CGI      qw( -utf8 );
51
use C4::Koha qw( GetAuthorisedValues );
51
use C4::Koha qw( GetAuthorisedValues );
52
use C4::Auth qw( get_template_and_user );
52
use C4::Auth qw( get_template_and_user );
53
use C4::Context;
53
use C4::Context;
(-)a/serials/subscription-detail.pl (-1 / +1 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI      qw ( -utf8 );
19
use CGI      qw( -utf8 );
20
use C4::Auth qw( get_template_and_user checkauth );
20
use C4::Auth qw( get_template_and_user checkauth );
21
use C4::Serials
21
use C4::Serials
22
    qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription );
22
    qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription );
(-)a/serials/subscription-frequencies.pl (-1 / +1 lines)
Lines 29-35 Manage subscription frequencies Link Here
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI qw ( -utf8 );
32
use CGI qw( -utf8 );
33
33
34
use C4::Auth    qw( get_template_and_user );
34
use C4::Auth    qw( get_template_and_user );
35
use C4::Output  qw( output_html_with_http_headers );
35
use C4::Output  qw( output_html_with_http_headers );
(-)a/serials/subscription-frequency.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
23
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
24
use C4::Auth               qw( check_cookie_auth );
24
use C4::Auth               qw( check_cookie_auth );
(-)a/serials/subscription-history.pl (-1 / +1 lines)
Lines 29-35 Modify subscription history Link Here
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI        qw ( -utf8 );
32
use CGI        qw( -utf8 );
33
use C4::Auth   qw( get_template_and_user );
33
use C4::Auth   qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
35
(-)a/serials/subscription-numberpattern.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI                        qw ( -utf8 );
21
use CGI                        qw( -utf8 );
22
use C4::Serials::Numberpattern qw( GetSubscriptionNumberpattern );
22
use C4::Serials::Numberpattern qw( GetSubscriptionNumberpattern );
23
use C4::Auth                   qw( check_cookie_auth );
23
use C4::Auth                   qw( check_cookie_auth );
24
use JSON                       qw( to_json );
24
use JSON                       qw( to_json );
(-)a/serials/subscription-numberpatterns.pl (-1 / +1 lines)
Lines 28-34 Manage numbering patterns Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
use CGI qw ( -utf8 );
31
use CGI qw( -utf8 );
32
32
33
use C4::Auth                   qw( get_template_and_user );
33
use C4::Auth                   qw( get_template_and_user );
34
use C4::Output                 qw( output_html_with_http_headers );
34
use C4::Output                 qw( output_html_with_http_headers );
(-)a/serials/subscription-renew.pl (-1 / +1 lines)
Lines 44-50 Id of the subscription this script has to renew Link Here
44
44
45
use Modern::Perl;
45
use Modern::Perl;
46
46
47
use CGI  qw ( -utf8 );
47
use CGI  qw( -utf8 );
48
use Carp qw( carp );
48
use Carp qw( carp );
49
use C4::Koha;
49
use C4::Koha;
50
use C4::Auth qw( get_template_and_user );
50
use C4::Auth qw( get_template_and_user );
(-)a/serials/viewalerts.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::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 );
(-)a/services/itemrecorddisplay.pl (-1 / +1 lines)
Lines 29-35 It uses PrepareItemrecordDisplay Link Here
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI        qw ( -utf8 );
32
use CGI        qw( -utf8 );
33
use C4::Auth   qw( get_template_and_user );
33
use C4::Auth   qw( get_template_and_user );
34
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Items  qw( PrepareItemrecordDisplay );
35
use C4::Items  qw( PrepareItemrecordDisplay );
(-)a/sip2/sip2.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use C4::Context;
21
use C4::Context;
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/suggestion/suggestion.pl (-3 / +3 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
require Exporter;
21
require Exporter;
22
use CGI        qw ( -utf8 );
22
use CGI        qw( -utf8 );
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers output_and_exit_if_error );
24
use C4::Output qw( output_html_with_http_headers output_and_exit_if_error );
25
use C4::Suggestions;
25
use C4::Suggestions;
Lines 442-453 if ( $op eq 'else' ) { Link Here
442
    if ( $search_params->{budgetid} && $search_params->{budgetid} eq '__NONE__' ) {
442
    if ( $search_params->{budgetid} && $search_params->{budgetid} eq '__NONE__' ) {
443
        $search_params->{budgetid} = [ undef, '' ];
443
        $search_params->{budgetid} = [ undef, '' ];
444
    }
444
    }
445
    for my $f (qw (branchcode budgetid)) {
445
    for my $f (qw(branchcode budgetid)) {
446
        delete $search_params->{$f}
446
        delete $search_params->{$f}
447
            if $search_params->{$f} eq '__ANY__'
447
            if $search_params->{$f} eq '__ANY__'
448
            || $search_params->{$f} eq '';
448
            || $search_params->{$f} eq '';
449
    }
449
    }
450
    for my $bi (qw (title author isbn publishercode copyrightdate collectiontitle)) {
450
    for my $bi (qw(title author isbn publishercode copyrightdate collectiontitle)) {
451
        if ( $search_params->{$bi} ) {
451
        if ( $search_params->{$bi} ) {
452
            $search_params->{"me.$bi"} = { 'like' => "%" . $search_params->{$bi} . "%" };
452
            $search_params->{"me.$bi"} = { 'like' => "%" . $search_params->{$bi} . "%" };
453
            delete $search_params->{$bi};
453
            delete $search_params->{$bi};
(-)a/svc/article_request (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI  qw ( -utf8 );
23
use CGI  qw( -utf8 );
24
use JSON qw(to_json);
24
use JSON qw(to_json);
25
25
26
use C4::Auth qw(check_cookie_auth);
26
use C4::Auth qw(check_cookie_auth);
(-)a/svc/authentication (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw/check_api_auth get_session/;
24
use C4::Auth qw/check_api_auth get_session/;
25
use XML::Simple;
25
use XML::Simple;
26
26
(-)a/svc/bib (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI        qw ( -utf8 );
24
use CGI        qw( -utf8 );
25
use C4::Auth   qw( check_api_auth );
25
use C4::Auth   qw( check_api_auth );
26
use C4::Biblio qw( GetFrameworkCode );
26
use C4::Biblio qw( GetFrameworkCode );
27
use C4::Items;
27
use C4::Items;
(-)a/svc/bib_framework (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
#
19
#
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI      qw ( -utf8 );
21
use CGI      qw( -utf8 );
22
use C4::Auth qw/check_api_auth/;
22
use C4::Auth qw/check_api_auth/;
23
use C4::Biblio;
23
use C4::Biblio;
24
use C4::Items;
24
use C4::Items;
(-)a/svc/bib_profile (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw/check_api_auth/;
24
use C4::Auth qw/check_api_auth/;
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Koha;
(-)a/svc/checkout_notes (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use JSON qw( to_json );
22
use JSON qw( to_json );
23
use CGI;
23
use CGI;
24
use C4::Auth   qw ( check_cookie_auth );
24
use C4::Auth   qw( check_cookie_auth );
25
use C4::Output qw( is_ajax output_with_http_headers );
25
use C4::Output qw( is_ajax output_with_http_headers );
26
use Koha::Checkouts;
26
use Koha::Checkouts;
27
27
(-)a/svc/convert_report (-1 / +1 lines)
Lines 23-29 use C4::Reports::Guided; Link Here
23
use Koha::Reports;
23
use Koha::Reports;
24
use C4::Auth   qw( get_template_and_user get_session );
24
use C4::Auth   qw( get_template_and_user get_session );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use CGI        qw ( -utf8 );
26
use CGI        qw( -utf8 );
27
27
28
my $query     = CGI->new();
28
my $query     = CGI->new();
29
my $report_id = $query->param('id');
29
my $report_id = $query->param('id');
(-)a/svc/cover_images (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw/check_cookie_auth/;
24
use C4::Auth qw/check_cookie_auth/;
25
use Koha::CoverImages;
25
use Koha::CoverImages;
26
use JSON qw/to_json/;
26
use JSON qw/to_json/;
(-)a/svc/import_bib (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw/check_api_auth/;
24
use C4::Auth qw/check_api_auth/;
25
use C4::Context;
25
use C4::Context;
26
use C4::ImportBatch
26
use C4::ImportBatch
(-)a/svc/new_bib (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI      qw ( -utf8 );
23
use CGI      qw( -utf8 );
24
use C4::Auth qw/check_api_auth/;
24
use C4::Auth qw/check_api_auth/;
25
use C4::Biblio;
25
use C4::Biblio;
26
use C4::Items;
26
use C4::Items;
(-)a/svc/report (-1 / +1 lines)
Lines 24-30 use C4::Auth qw( check_api_auth ); Link Here
24
use C4::Reports::Guided qw( execute_query );
24
use C4::Reports::Guided qw( execute_query );
25
use Koha::Reports;
25
use Koha::Reports;
26
use JSON qw( encode_json decode_json to_json );
26
use JSON qw( encode_json decode_json to_json );
27
use CGI  qw ( -utf8 );
27
use CGI  qw( -utf8 );
28
28
29
use Koha::Caches;
29
use Koha::Caches;
30
30
(-)a/t/Languages.t (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use Test::NoWarnings;
21
use Test::NoWarnings;
22
use Test::More tests => 6;
22
use Test::More tests => 6;
23
use Test::MockModule;
23
use Test::MockModule;
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
use Koha::Cache::Memory::Lite;
25
use Koha::Cache::Memory::Lite;
26
use Koha::Language;
26
use Koha::Language;
27
27
(-)a/t/Output.t (-1 / +1 lines)
Lines 24-30 use Test::Exception; Link Here
24
use Test::MockModule;
24
use Test::MockModule;
25
25
26
use File::Temp qw/tempfile/;
26
use File::Temp qw/tempfile/;
27
use CGI        qw ( -utf8 );
27
use CGI        qw( -utf8 );
28
28
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
30
(-)a/t/db_dependent/Auth.t (-5 / +5 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw( -utf8 );
6
6
7
use Test::MockObject;
7
use Test::MockObject;
8
use Test::MockModule;
8
use Test::MockModule;
Lines 1192-1198 subtest 'checkpw() return values tests' => sub { Link Here
1192
        $password_expired = 1;
1192
        $password_expired = 1;
1193
        @return           = checkpw( $patron->userid, $password, undef, );
1193
        @return           = checkpw( $patron->userid, $password, undef, );
1194
1194
1195
        is( scalar @return,     2, "Two results on expired password scenario" );
1195
        is( scalar @return,    2,  "Two results on expired password scenario" );
1196
        is( $return[0],        -2, '-2 returned' );
1196
        is( $return[0],        -2, '-2 returned' );
1197
        is( ref( $return[1] ), 'Koha::Patron' );
1197
        is( ref( $return[1] ), 'Koha::Patron' );
1198
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
1198
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
Lines 1200-1206 subtest 'checkpw() return values tests' => sub { Link Here
1200
        t::lib::Mocks::mock_preference( 'AnonymousPatron', $patron->id );
1200
        t::lib::Mocks::mock_preference( 'AnonymousPatron', $patron->id );
1201
        @return = checkpw( $patron->userid, $password, undef, );
1201
        @return = checkpw( $patron->userid, $password, undef, );
1202
1202
1203
        is( scalar @return,     2, "Two results on expired password scenario" );
1203
        is( scalar @return,    2,  "Two results on expired password scenario" );
1204
        is( $return[0],        -3, '-3 returned' );
1204
        is( $return[0],        -3, '-3 returned' );
1205
        is( ref( $return[1] ), 'Koha::Patron' );
1205
        is( ref( $return[1] ), 'Koha::Patron' );
1206
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
1206
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
Lines 1284-1297 subtest 'checkpw() return values tests' => sub { Link Here
1284
        $password_expired = 1;
1284
        $password_expired = 1;
1285
        @return           = checkpw( $patron->userid, $password, $query, );
1285
        @return           = checkpw( $patron->userid, $password, $query, );
1286
1286
1287
        is( scalar @return,     2, "Two results on expired password scenario" );
1287
        is( scalar @return,    2,  "Two results on expired password scenario" );
1288
        is( $return[0],        -2, '-2 returned' );
1288
        is( $return[0],        -2, '-2 returned' );
1289
        is( ref( $return[1] ), 'Koha::Patron' );
1289
        is( ref( $return[1] ), 'Koha::Patron' );
1290
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
1290
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
1291
1291
1292
        t::lib::Mocks::mock_preference( 'AnonymousPatron', $patron->id );
1292
        t::lib::Mocks::mock_preference( 'AnonymousPatron', $patron->id );
1293
        @return = checkpw( $patron->userid, $password, undef, );
1293
        @return = checkpw( $patron->userid, $password, undef, );
1294
        is( scalar @return,     2, "Two results on expired password scenario" );
1294
        is( scalar @return,    2,  "Two results on expired password scenario" );
1295
        is( $return[0],        -3, '-3 returned' );
1295
        is( $return[0],        -3, '-3 returned' );
1296
        is( ref( $return[1] ), 'Koha::Patron' );
1296
        is( ref( $return[1] ), 'Koha::Patron' );
1297
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
1297
        is( $return[1]->id,    $patron->id, 'Patron matched correctly' );
(-)a/t/db_dependent/Cache.t (-3 / +3 lines)
Lines 210-229 SKIP: { Link Here
210
    $cache->set_in_cache( 'test_deep_copy_array', \@item );
210
    $cache->set_in_cache( 'test_deep_copy_array', \@item );
211
    $item_from_cache  = $cache->get_from_cache('test_deep_copy_array');
211
    $item_from_cache  = $cache->get_from_cache('test_deep_copy_array');
212
    @$item_from_cache = qw( another array ref );
212
    @$item_from_cache = qw( another array ref );
213
    is_deeply( $cache->get_from_cache('test_deep_copy_array'), [qw ( an array ref )], 'An array will be deep copied' );
213
    is_deeply( $cache->get_from_cache('test_deep_copy_array'), [qw( an array ref )], 'An array will be deep copied' );
214
214
215
    $cache->flush_L1_cache();
215
    $cache->flush_L1_cache();
216
    $item_from_cache  = $cache->get_from_cache('test_deep_copy_array');
216
    $item_from_cache  = $cache->get_from_cache('test_deep_copy_array');
217
    @$item_from_cache = qw( another array ref );
217
    @$item_from_cache = qw( another array ref );
218
    is_deeply(
218
    is_deeply(
219
        $cache->get_from_cache('test_deep_copy_array'), [qw ( an array ref )],
219
        $cache->get_from_cache('test_deep_copy_array'), [qw( an array ref )],
220
        'An array will be deep copied even it is the first fetch from L2'
220
        'An array will be deep copied even it is the first fetch from L2'
221
    );
221
    );
222
222
223
    $item_from_cache  = $cache->get_from_cache( 'test_deep_copy_array', { unsafe => 1 } );
223
    $item_from_cache  = $cache->get_from_cache( 'test_deep_copy_array', { unsafe => 1 } );
224
    @$item_from_cache = qw( another array ref );
224
    @$item_from_cache = qw( another array ref );
225
    is_deeply(
225
    is_deeply(
226
        $cache->get_from_cache( 'test_deep_copy_array', { unsafe => 1 } ), [qw ( another array ref )],
226
        $cache->get_from_cache( 'test_deep_copy_array', { unsafe => 1 } ), [qw( another array ref )],
227
        'An array will not be deep copied if the unsafe flag is set'
227
        'An array will not be deep copied if the unsafe flag is set'
228
    );
228
    );
229
229
(-)a/t/db_dependent/ILSDI_Services.t (-2 / +2 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
21
22
use Test::NoWarnings;
22
use Test::NoWarnings;
23
use Test::More tests => 16;
23
use Test::More tests => 16;
Lines 29-35 use XML::LibXML; Link Here
29
29
30
use C4::Items       qw( ModItemTransfer );
30
use C4::Items       qw( ModItemTransfer );
31
use C4::Circulation qw( AddIssue );
31
use C4::Circulation qw( AddIssue );
32
use C4::Reserves    qw (AddReserve ModReserve ModReserveAffect ModReserveStatus);
32
use C4::Reserves    qw(AddReserve ModReserve ModReserveAffect ModReserveStatus);
33
33
34
use Koha::AuthUtils;
34
use Koha::AuthUtils;
35
use Koha::DateUtils qw( dt_from_string );
35
use Koha::DateUtils qw( dt_from_string );
(-)a/t/db_dependent/Output.t (-1 / +1 lines)
Lines 22-28 use Test::MockModule; Link Here
22
use Test::NoWarnings;
22
use Test::NoWarnings;
23
use Test::Warn;
23
use Test::Warn;
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
26
27
use t::lib::Mocks;
27
use t::lib::Mocks;
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
(-)a/t/db_dependent/Search/History.t (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw( -utf8 );
6
use Test::MockModule;
6
use Test::MockModule;
7
use List::MoreUtils qw/all any none/;
7
use List::MoreUtils qw/all any none/;
8
use t::lib::Mocks;
8
use t::lib::Mocks;
(-)a/t/db_dependent/api/v1/biblios.t (-90 / +44 lines)
Lines 36-42 use C4::Circulation qw( AddIssue AddReturn ); Link Here
36
36
37
use Koha::Biblios;
37
use Koha::Biblios;
38
use Koha::Database;
38
use Koha::Database;
39
use Koha::DateUtils qw (dt_from_string output_pref);
39
use Koha::DateUtils qw(dt_from_string output_pref);
40
use Koha::Checkouts;
40
use Koha::Checkouts;
41
use Koha::Old::Checkouts;
41
use Koha::Old::Checkouts;
42
42
Lines 81-88 subtest 'get() tests' => sub { Link Here
81
        ->status_is(400);
81
        ->status_is(400);
82
82
83
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/json' } )
83
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/json' } )
84
        ->status_is(200)
84
        ->status_is(200)->json_is( '/title', 'The unbearable lightness of being' )
85
        ->json_is( '/title',  'The unbearable lightness of being' )
86
        ->json_is( '/author', 'Milan Kundera' );
85
        ->json_is( '/author', 'Milan Kundera' );
87
86
88
    $t->get_ok(
87
    $t->get_ok(
Lines 97-117 subtest 'get() tests' => sub { Link Here
97
        ->status_is(200);
96
        ->status_is(200);
98
97
99
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
98
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
100
        ->status_is(200)
99
        ->status_is(200)->content_is( $biblio->metadata->record->as_formatted );
101
        ->content_is( $biblio->metadata->record->as_formatted );
102
100
103
    # Simulate a data error situation (BZ35246)
101
    # Simulate a data error situation (BZ35246)
104
    $biblio->biblioitem->delete();
102
    $biblio->biblioitem->delete();
105
103
106
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/json' } )
104
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/json' } )
107
        ->status_is(500)
105
        ->status_is(500)->json_is( '/error_code', 'internal_server_error' )
108
        ->json_is( '/error_code', 'internal_server_error' )
106
        ->json_is( '/error', 'Something went wrong, check Koha logs for details.' );
109
        ->json_is( '/error',      'Something went wrong, check Koha logs for details.' );
110
107
111
    $biblio->delete;
108
    $biblio->delete;
112
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
109
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
113
        ->status_is(404)
110
        ->status_is(404)->json_is( '/error', 'Bibliographic record not found' );
114
        ->json_is( '/error', 'Bibliographic record not found' );
115
111
116
    subtest 'marc-in-json encoding tests' => sub {
112
    subtest 'marc-in-json encoding tests' => sub {
117
113
Lines 128-135 subtest 'get() tests' => sub { Link Here
128
124
129
        my $result = $t->get_ok(
125
        my $result = $t->get_ok(
130
            "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marc-in-json' } )
126
            "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marc-in-json' } )
131
            ->status_is(200)
127
            ->status_is(200)->tx->res->body;
132
            ->tx->res->body;
133
128
134
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
129
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
135
130
Lines 158-165 subtest 'get() tests' => sub { Link Here
158
153
159
        my $result = $t->get_ok(
154
        my $result = $t->get_ok(
160
            "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marcxml+xml' } )
155
            "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber => { Accept => 'application/marcxml+xml' } )
161
            ->status_is(200)
156
            ->status_is(200)->tx->res->body;
162
            ->tx->res->body;
163
157
164
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
158
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
165
159
Lines 192-207 subtest 'get_items() tests' => sub { Link Here
192
186
193
    $patron->flags(4)->store;
187
    $patron->flags(4)->store;
194
188
195
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items" )
189
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items" )->status_is(200)
196
        ->status_is(200)
197
        ->json_is( '' => [], 'No items on the biblio' );
190
        ->json_is( '' => [], 'No items on the biblio' );
198
191
199
    my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } );
192
    my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } );
200
    my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } );
193
    my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } );
201
194
202
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items?_order_by=item_id" )
195
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items?_order_by=item_id" )
203
        ->status_is(200)
196
        ->status_is(200)->json_is( '' => [ $item_1->to_api, $item_2->to_api ], 'The items are returned' );
204
        ->json_is( '' => [ $item_1->to_api, $item_2->to_api ], 'The items are returned' );
205
197
206
    $t->get_ok(
198
    $t->get_ok(
207
        "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items" => { "x-koha-embed" => "+strings" } )
199
        "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/items" => { "x-koha-embed" => "+strings" } )
Lines 242-249 subtest 'get_items() tests' => sub { Link Here
242
234
243
        $t->get_ok( "//$userid:$password@/api/v1/biblios/"
235
        $t->get_ok( "//$userid:$password@/api/v1/biblios/"
244
                . $item->biblionumber
236
                . $item->biblionumber
245
                . "/items" => { "x-koha-embed" => "first_hold+strings" } )
237
                . "/items" => { "x-koha-embed" => "first_hold+strings" } )->status_is(200)
246
            ->status_is(200)
247
            ->json_is(
238
            ->json_is(
248
            '/0/first_hold/_strings/pickup_library_id' => { type => 'library', str => $pickup_library->branchname } );
239
            '/0/first_hold/_strings/pickup_library_id' => { type => 'library', str => $pickup_library->branchname } );
249
    };
240
    };
Lines 291-298 subtest 'delete() tests' => sub { Link Here
291
    $item->delete();
282
    $item->delete();
292
283
293
    # Bibs with no items can be deleted
284
    # Bibs with no items can be deleted
294
    $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")
285
    $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")->status_is( 204, 'REST3.2.4' )
295
        ->status_is( 204, 'REST3.2.4' )
296
        ->content_is( '', 'REST3.3.4' );
286
        ->content_is( '', 'REST3.3.4' );
297
287
298
    $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")->status_is(404);
288
    $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")->status_is(404);
Lines 339-346 subtest 'get_public() tests' => sub { Link Here
339
            . $biblio->biblionumber => { Accept => 'application/weird+format' } )->status_is(400);
329
            . $biblio->biblionumber => { Accept => 'application/weird+format' } )->status_is(400);
340
330
341
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
331
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
342
        ->status_is(200)
332
        ->status_is(200)->content_like(qr{100\s+_aMilan Kundera})
343
        ->content_like(qr{100\s+_aMilan Kundera})
344
        ->content_like(qr{245\s+_aThe unbearable lightness of being});
333
        ->content_like(qr{245\s+_aThe unbearable lightness of being});
345
334
346
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/"
335
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/"
Lines 354-361 subtest 'get_public() tests' => sub { Link Here
354
        ->status_is(200);
343
        ->status_is(200);
355
344
356
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
345
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
357
        ->status_is(200)
346
        ->status_is(200)->content_is( $biblio->metadata->record->as_formatted );
358
        ->content_is( $biblio->metadata->record->as_formatted );
359
347
360
    subtest 'anonymous access' => sub {
348
    subtest 'anonymous access' => sub {
361
        plan tests => 9;
349
        plan tests => 9;
Lines 369-376 subtest 'get_public() tests' => sub { Link Here
369
        $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
357
        $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
370
            ->status_is(200);
358
            ->status_is(200);
371
359
372
        $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
360
        $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )->status_is(200)
373
            ->status_is(200)
374
            ->content_is( $biblio->metadata->record->as_formatted );
361
            ->content_is( $biblio->metadata->record->as_formatted );
375
    };
362
    };
376
363
Lines 389-396 subtest 'get_public() tests' => sub { Link Here
389
376
390
        my $result =
377
        my $result =
391
            $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc-in-json' } )
378
            $t->get_ok( "/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc-in-json' } )
392
            ->status_is(200)
379
            ->status_is(200)->tx->res->body;
393
            ->tx->res->body;
394
380
395
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
381
        my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
396
382
Lines 406-413 subtest 'get_public() tests' => sub { Link Here
406
    Koha::Caches->get_instance()->flush_all;
392
    Koha::Caches->get_instance()->flush_all;
407
393
408
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
394
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'text/plain' } )
409
        ->status_is(200)
395
        ->status_is(200)->content_unlike(qr{100\s+_aMilan Kundera})
410
        ->content_unlike(qr{100\s+_aMilan Kundera})
411
        ->content_like(qr{245\s+_aThe unbearable lightness of being});
396
        ->content_like(qr{245\s+_aThe unbearable lightness of being});
412
397
413
    subtest 'hidden_in_opac tests' => sub {
398
    subtest 'hidden_in_opac tests' => sub {
Lines 471-478 subtest 'get_public() tests' => sub { Link Here
471
    $biblio->delete;
456
    $biblio->delete;
472
    $t->get_ok(
457
    $t->get_ok(
473
        "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
458
        "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber => { Accept => 'application/marc' } )
474
        ->status_is(404)
459
        ->status_is(404)->json_is( '/error', 'Bibliographic record not found' );
475
        ->json_is( '/error', 'Bibliographic record not found' );
476
460
477
    $schema->storage->txn_rollback;
461
    $schema->storage->txn_rollback;
478
};
462
};
Lines 597-604 subtest 'pickup_locations() tests' => sub { Link Here
597
                . "patron_id="
581
                . "patron_id="
598
                . $patron->id
582
                . $patron->id
599
                . "&_order_by=marc_org_code"
583
                . "&_order_by=marc_org_code"
600
                . "&_per_page=1" )
584
                . "&_per_page=1" )->json_is( [$library_1_api] )
601
            ->json_is( [$library_1_api] )
602
            ->header_is( 'X-Total-Count',      '4', '4 is the count for libraries with pickup_location=1' )
585
            ->header_is( 'X-Total-Count',      '4', '4 is the count for libraries with pickup_location=1' )
603
            ->header_is( 'X-Base-Total-Count', '4', '4 is the count for libraries with pickup_location=1' )
586
            ->header_is( 'X-Base-Total-Count', '4', '4 is the count for libraries with pickup_location=1' )
604
            ->header_unlike( 'Link', qr|rel="prev"| )
587
            ->header_unlike( 'Link', qr|rel="prev"| )
Lines 629-639 subtest 'pickup_locations() tests' => sub { Link Here
629
                . "patron_id="
612
                . "patron_id="
630
                . $patron->id
613
                . $patron->id
631
                . "&_order_by=marc_org_code"
614
                . "&_order_by=marc_org_code"
632
                . "&_per_page=1" )
615
                . "&_per_page=1" )->json_is( [$library_1_api] )->header_is( 'X-Total-Count', '2' )
633
            ->json_is( [$library_1_api] )
616
            ->header_is( 'X-Base-Total-Count', '2' )->header_unlike( 'Link', qr|rel="prev"| )
634
            ->header_is( 'X-Total-Count',      '2' )
635
            ->header_is( 'X-Base-Total-Count', '2' )
636
            ->header_unlike( 'Link', qr|rel="prev"| )
637
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=2.*|_page=2.*\&_per_page=1.*)>\; rel="next"# )
617
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=2.*|_page=2.*\&_per_page=1.*)>\; rel="next"# )
638
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=1.*|_page=1.*\&_per_page=1).*>\; rel="first"# )
618
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=1.*|_page=1.*\&_per_page=1).*>\; rel="first"# )
639
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=2.*|_page=2.*\&_per_page=1).*>\; rel="last"# );
619
            ->header_like( 'Link', qr#(_per_page=1.*\&_page=2.*|_page=2.*\&_per_page=1).*>\; rel="last"# );
Lines 653-660 subtest 'pickup_locations() tests' => sub { Link Here
653
633
654
    $t->get_ok(
634
    $t->get_ok(
655
        "//$userid:$password@/api/v1/biblios/" . $biblio->id . "/pickup_locations?" . "patron_id=" . $patron->id )
635
        "//$userid:$password@/api/v1/biblios/" . $biblio->id . "/pickup_locations?" . "patron_id=" . $patron->id )
656
        ->status_is(404)
636
        ->status_is(404)->json_is( '/error' => 'Bibliographic record not found' );
657
        ->json_is( '/error' => 'Bibliographic record not found' );
658
637
659
    $schema->storage->txn_rollback;
638
    $schema->storage->txn_rollback;
660
};
639
};
Lines 693-707 subtest 'get_items_public() tests' => sub { Link Here
693
672
694
    my $biblio = $builder->build_sample_biblio();
673
    my $biblio = $builder->build_sample_biblio();
695
674
696
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->id . "/items" )
675
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->id . "/items" )->status_is(200)
697
        ->status_is(200)
698
        ->json_is( '' => [], 'No items on the biblio' );
676
        ->json_is( '' => [], 'No items on the biblio' );
699
677
700
    my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->id } );
678
    my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->id } );
701
    my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->id, withdrawn => 1 } );
679
    my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->id, withdrawn => 1 } );
702
680
703
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )
681
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )->status_is(200)
704
        ->status_is(200)
705
        ->json_is(
682
        ->json_is(
706
        '' => [
683
        '' => [
707
            $item_1->to_api( { public => 1 } ),
684
            $item_1->to_api( { public => 1 } ),
Lines 712-719 subtest 'get_items_public() tests' => sub { Link Here
712
689
713
    $rules = { withdrawn => ['1'] };
690
    $rules = { withdrawn => ['1'] };
714
691
715
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )
692
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )->status_is(200)
716
        ->status_is(200)
717
        ->json_is(
693
        ->json_is(
718
        '' => [ $item_1->to_api( { public => 1 } ) ],
694
        '' => [ $item_1->to_api( { public => 1 } ) ],
719
        'The items are returned, hidden one is not returned'
695
        'The items are returned, hidden one is not returned'
Lines 726-733 subtest 'get_items_public() tests' => sub { Link Here
726
702
727
    $override_hidden_items = 1;
703
    $override_hidden_items = 1;
728
704
729
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )
705
    $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/items" )->status_is(200)
730
        ->status_is(200)
731
        ->json_is(
706
        ->json_is(
732
        '' => [
707
        '' => [
733
            $item_1->to_api( { public => 1 } ),
708
            $item_1->to_api( { public => 1 } ),
Lines 780-787 subtest 'get_bookings() tests' => sub { Link Here
780
755
781
    $t->get_ok( "//$unauth_userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )->status_is(403);
756
    $t->get_ok( "//$unauth_userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )->status_is(403);
782
757
783
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )
758
    $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )->status_is(200)
784
        ->status_is(200)
785
        ->json_is( '' => [], 'No bookings on the biblio' );
759
        ->json_is( '' => [], 'No bookings on the biblio' );
786
760
787
    # One booking
761
    # One booking
Lines 800-807 subtest 'get_bookings() tests' => sub { Link Here
800
    );
774
    );
801
775
802
    my $ret =
776
    my $ret =
803
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )
777
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/bookings" )->status_is(200)
804
        ->status_is(200)
805
        ->tx->res->json;
778
        ->tx->res->json;
806
779
807
    is_deeply( $ret, [ $booking_0->to_api ] );
780
    is_deeply( $ret, [ $booking_0->to_api ] );
Lines 874-881 subtest 'get_checkouts() tests' => sub { Link Here
874
    AddIssue( $patron, $item_2->barcode );
847
    AddIssue( $patron, $item_2->barcode );
875
848
876
    my $ret =
849
    my $ret =
877
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts" )
850
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts" )->status_is(200)
878
        ->status_is(200)
879
        ->tx->res->json;
851
        ->tx->res->json;
880
852
881
    my $checkout_1 = Koha::Checkouts->find( { itemnumber => $item_1->id } );
853
    my $checkout_1 = Koha::Checkouts->find( { itemnumber => $item_1->id } );
Lines 886-901 subtest 'get_checkouts() tests' => sub { Link Here
886
    AddReturn( $item_1->barcode );
858
    AddReturn( $item_1->barcode );
887
859
888
    $ret =
860
    $ret =
889
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts" )
861
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts" )->status_is(200)
890
        ->status_is(200)
891
        ->tx->res->json;
862
        ->tx->res->json;
892
863
893
    is_deeply( $ret, [ $checkout_2->to_api ] );
864
    is_deeply( $ret, [ $checkout_2->to_api ] );
894
865
895
    $ret =
866
    $ret =
896
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts?checked_in=1" )
867
        $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber . "/checkouts?checked_in=1" )
897
        ->status_is(200)
868
        ->status_is(200)->tx->res->json;
898
        ->tx->res->json;
899
869
900
    my $old_checkout_1 = Koha::Old::Checkouts->find( $checkout_1->id );
870
    my $old_checkout_1 = Koha::Old::Checkouts->find( $checkout_1->id );
901
871
Lines 927-944 subtest 'set_rating() tests' => sub { Link Here
927
897
928
    $t->post_ok(
898
    $t->post_ok(
929
        "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/ratings" => json => { rating => 3 } )
899
        "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber . "/ratings" => json => { rating => 3 } )
930
        ->status_is(200)
900
        ->status_is(200)->json_is( '/rating', '3' )->json_is( '/average', '3' )->json_is( '/count', '1' );
931
        ->json_is( '/rating',  '3' )
932
        ->json_is( '/average', '3' )
933
        ->json_is( '/count',   '1' );
934
901
935
    $t->post_ok( "//$userid:$password@/api/v1/public/biblios/"
902
    $t->post_ok( "//$userid:$password@/api/v1/public/biblios/"
936
            . $biblio->biblionumber
903
            . $biblio->biblionumber
937
            . "/ratings" => json => { rating => undef } )
904
            . "/ratings" => json => { rating => undef } )->status_is(200)->json_is( '/rating', undef )
938
        ->status_is(200)
905
        ->json_is( '/average', '0' )->json_is( '/count', '0' );
939
        ->json_is( '/rating',  undef )
940
        ->json_is( '/average', '0' )
941
        ->json_is( '/count',   '0' );
942
906
943
    $schema->storage->txn_rollback;
907
    $schema->storage->txn_rollback;
944
908
Lines 1364-1371 subtest 'add() tests' => sub { Link Here
1364
1328
1365
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1329
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1366
            { 'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode } => $marcxml )
1330
            { 'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode } => $marcxml )
1367
        ->status_is(200)
1331
        ->status_is(200)->json_has('/id')
1368
        ->json_has('/id')
1369
        ->header_is( 'Location' => "/api/v1/biblios/" . $t->tx->res->json->{id}, "REST3.4.1" );
1332
        ->header_is( 'Location' => "/api/v1/biblios/" . $t->tx->res->json->{id}, "REST3.4.1" );
1370
1333
1371
    $t->post_ok(
1334
    $t->post_ok(
Lines 1376-1383 subtest 'add() tests' => sub { Link Here
1376
    )->status_is(200)->json_has('/id');
1339
    )->status_is(200)->json_has('/id');
1377
1340
1378
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1341
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1379
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )
1342
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )->status_is(200)
1380
        ->status_is(200)
1381
        ->json_has('/id');
1343
        ->json_has('/id');
1382
1344
1383
    subtest 'x-record-source-id header tests' => sub {
1345
    subtest 'x-record-source-id header tests' => sub {
Lines 1421-1428 subtest 'add() tests' => sub { Link Here
1421
    $mock_biblio->mock( 'AddBiblio', sub { return ( undef, undef ); } );
1383
    $mock_biblio->mock( 'AddBiblio', sub { return ( undef, undef ); } );
1422
1384
1423
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1385
    $t->post_ok( "//$userid:$password@/api/v1/biblios" =>
1424
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )
1386
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )->status_is(400)
1425
        ->status_is(400)
1426
        ->json_is(
1387
        ->json_is(
1427
        {
1388
        {
1428
            error      => 'Error creating record',
1389
            error      => 'Error creating record',
Lines 1850-1857 subtest 'put() tests' => sub { Link Here
1850
1811
1851
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1812
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1852
            { 'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode } => $marcxml )
1813
            { 'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode } => $marcxml )
1853
        ->status_is(200)
1814
        ->status_is(200)->json_has('/id');
1854
        ->json_has('/id');
1855
1815
1856
    $biblio = Koha::Biblios->find($biblionumber);
1816
    $biblio = Koha::Biblios->find($biblionumber);
1857
1817
Lines 1859-1874 subtest 'put() tests' => sub { Link Here
1859
1819
1860
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1820
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1861
            { 'Content-Type' => 'application/marc-in-json', 'x-framework-id' => $frameworkcode } => $mij )
1821
            { 'Content-Type' => 'application/marc-in-json', 'x-framework-id' => $frameworkcode } => $mij )
1862
        ->status_is(200)
1822
        ->status_is(200)->json_has('/id');
1863
        ->json_has('/id');
1864
1823
1865
    $biblio = Koha::Biblios->find($biblionumber);
1824
    $biblio = Koha::Biblios->find($biblionumber);
1866
1825
1867
    is( $biblio->title, 'Introduction to Attic Greek  (Using mij) /' );
1826
    is( $biblio->title, 'Introduction to Attic Greek  (Using mij) /' );
1868
1827
1869
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1828
    $t->put_ok( "//$userid:$password@/api/v1/biblios/$biblionumber" =>
1870
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )
1829
            { 'Content-Type' => 'application/marc', 'x-framework-id' => $frameworkcode } => $marc )->status_is(200)
1871
        ->status_is(200)
1872
        ->json_has('/id');
1830
        ->json_has('/id');
1873
1831
1874
    $biblio = Koha::Biblios->find($biblionumber);
1832
    $biblio = Koha::Biblios->find($biblionumber);
Lines 1927-1934 subtest 'list() tests' => sub { Link Here
1927
1885
1928
    my $result =
1886
    my $result =
1929
        $t->get_ok( "//$userid:$password@/api/v1/biblios?q=$query" => { Accept => 'application/marcxml+xml' } )
1887
        $t->get_ok( "//$userid:$password@/api/v1/biblios?q=$query" => { Accept => 'application/marcxml+xml' } )
1930
        ->status_is(200)
1888
        ->status_is(200)->tx->res->body;
1931
        ->tx->res->body;
1932
1889
1933
    my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
1890
    my $encoded_title = Encode::encode( "UTF-8", $title_with_diacritics );
1934
    like( $result, qr/\Q$encoded_title/, "The title is not double encoded" );
1891
    like( $result, qr/\Q$encoded_title/, "The title is not double encoded" );
Lines 1956-1963 subtest 'list() tests' => sub { Link Here
1956
1913
1957
    $query = encode_json( { biblio_id => $biblio->id } );
1914
    $query = encode_json( { biblio_id => $biblio->id } );
1958
1915
1959
    $t->get_ok( "//$userid:$password@/api/v1/biblios?q=$query" => { Accept => 'application/json' } )
1916
    $t->get_ok( "//$userid:$password@/api/v1/biblios?q=$query" => { Accept => 'application/json' } )->status_is(200)
1960
        ->status_is(200)
1961
        ->json_is( '/0/timestamp' =>
1917
        ->json_is( '/0/timestamp' =>
1962
            output_pref( { dt => $fixed_date, dateformat => 'rfc3339' }, 'biblio table timestamp takes precedence' ) );
1918
            output_pref( { dt => $fixed_date, dateformat => 'rfc3339' }, 'biblio table timestamp takes precedence' ) );
1963
1919
Lines 2321-2328 subtest 'merge() tests' => sub { Link Here
2321
    my $result =
2277
    my $result =
2322
        $t->post_ok( "//$userid:$password@/api/v1/biblios/$biblio_id1/merge" =>
2278
        $t->post_ok( "//$userid:$password@/api/v1/biblios/$biblio_id1/merge" =>
2323
            { 'Content-Type' => 'application/json', 'Accept' => 'application/marc-in-json' } => $json_input1 )
2279
            { 'Content-Type' => 'application/json', 'Accept' => 'application/marc-in-json' } => $json_input1 )
2324
        ->status_is(200)
2280
        ->status_is(200)->tx->res->body;
2325
        ->tx->res->body;
2326
    like( $result, qr/$title_1/, "Merged record has the correct title" );
2281
    like( $result, qr/$title_1/, "Merged record has the correct title" );
2327
    unlike( $result, qr/$title_2/, "Merged record doesn't have the wrong title" );
2282
    unlike( $result, qr/$title_2/, "Merged record doesn't have the wrong title" );
2328
2283
Lines 2334-2341 subtest 'merge() tests' => sub { Link Here
2334
    $result =
2289
    $result =
2335
        $t->post_ok( "//$userid:$password@/api/v1/biblios/$biblio_id1/merge" =>
2290
        $t->post_ok( "//$userid:$password@/api/v1/biblios/$biblio_id1/merge" =>
2336
            { 'Content-Type' => 'application/json', 'Accept' => 'application/marc-in-json' } => $json_input2 )
2291
            { 'Content-Type' => 'application/json', 'Accept' => 'application/marc-in-json' } => $json_input2 )
2337
        ->status_is(200)
2292
        ->status_is(200)->tx->res->body;
2338
        ->tx->res->body;
2339
    like( $result, qr/Using mij/, "Update with Marc-in-json record" );
2293
    like( $result, qr/Using mij/, "Update with Marc-in-json record" );
2340
    unlike( $result, qr/$title_1/, "Change all record with dat in the 'datarecord' field" );
2294
    unlike( $result, qr/$title_1/, "Change all record with dat in the 'datarecord' field" );
2341
2295
(-)a/t/db_dependent/api/v1/bookings.t (-35 / +18 lines)
Lines 29-35 use JSON qw(encode_json); Link Here
29
29
30
use Koha::Bookings;
30
use Koha::Bookings;
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::DateUtils qw (dt_from_string output_pref);
32
use Koha::DateUtils qw(dt_from_string output_pref);
33
33
34
my $schema  = Koha::Database->new->schema;
34
my $schema  = Koha::Database->new->schema;
35
my $builder = t::lib::TestBuilder->new;
35
my $builder = t::lib::TestBuilder->new;
Lines 135-147 subtest 'list() tests' => sub { Link Here
135
135
136
    $api_filter = encode_json(
136
    $api_filter = encode_json(
137
        { 'me.start_date' => { '<=' => output_pref( { dateformat => "rfc3339", dt => dt_from_string } ) } } );
137
        { 'me.start_date' => { '<=' => output_pref( { dateformat => "rfc3339", dt => dt_from_string } ) } } );
138
    $t->get_ok("//$userid:$password@/api/v1/bookings?q=$api_filter")
138
    $t->get_ok("//$userid:$password@/api/v1/bookings?q=$api_filter")->status_is(200)
139
        ->status_is(200)
140
        ->json_is( '' => [ $booking_0->to_api ], 'filtering to before today also works' );
139
        ->json_is( '' => [ $booking_0->to_api ], 'filtering to before today also works' );
141
140
142
    # Warn on unsupported query parameter
141
    # Warn on unsupported query parameter
143
    $t->get_ok("//$userid:$password@/api/v1/bookings?booking_blah=blah")
142
    $t->get_ok("//$userid:$password@/api/v1/bookings?booking_blah=blah")->status_is(400)
144
        ->status_is(400)
145
        ->json_is( [ { path => '/query/booking_blah', message => 'Malformed query string' } ] );
143
        ->json_is( [ { path => '/query/booking_blah', message => 'Malformed query string' } ] );
146
144
147
    $schema->storage->txn_rollback;
145
    $schema->storage->txn_rollback;
Lines 178-193 subtest 'get() tests' => sub { Link Here
178
    $t->get_ok( "//$unauth_userid:$password@/api/v1/bookings/" . $booking->booking_id )->status_is(403);
176
    $t->get_ok( "//$unauth_userid:$password@/api/v1/bookings/" . $booking->booking_id )->status_is(403);
179
177
180
    # Authorized user tests
178
    # Authorized user tests
181
    $t->get_ok( "//$userid:$password@/api/v1/bookings/" . $booking->booking_id )
179
    $t->get_ok( "//$userid:$password@/api/v1/bookings/" . $booking->booking_id )->status_is(200)
182
        ->status_is(200)
183
        ->json_is( $booking->to_api );
180
        ->json_is( $booking->to_api );
184
181
185
    my $booking_to_delete = $builder->build_object( { class => 'Koha::Bookings' } );
182
    my $booking_to_delete = $builder->build_object( { class => 'Koha::Bookings' } );
186
    my $non_existent_id   = $booking_to_delete->id;
183
    my $non_existent_id   = $booking_to_delete->id;
187
    $booking_to_delete->delete;
184
    $booking_to_delete->delete;
188
185
189
    $t->get_ok("//$userid:$password@/api/v1/bookings/$non_existent_id")
186
    $t->get_ok("//$userid:$password@/api/v1/bookings/$non_existent_id")->status_is(404)
190
        ->status_is(404)
191
        ->json_is( '/error' => 'Booking not found' );
187
        ->json_is( '/error' => 'Booking not found' );
192
188
193
    $schema->storage->txn_rollback;
189
    $schema->storage->txn_rollback;
Lines 248-255 subtest 'add() tests' => sub { Link Here
248
    # Authorized attempt to write invalid data
244
    # Authorized attempt to write invalid data
249
    my $booking_with_invalid_field = { %{$booking}, blah => 'some stuff' };
245
    my $booking_with_invalid_field = { %{$booking}, blah => 'some stuff' };
250
246
251
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_invalid_field )
247
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_invalid_field )->status_is(400)
252
        ->status_is(400)
253
        ->json_is(
248
        ->json_is(
254
        "/errors" => [
249
        "/errors" => [
255
            {
250
            {
Lines 261-270 subtest 'add() tests' => sub { Link Here
261
256
262
    # Authorized attempt to write
257
    # Authorized attempt to write
263
    my $booking_id =
258
    my $booking_id =
264
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )
259
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is( 201, 'REST3.2.1' )
265
        ->status_is( 201, 'REST3.2.1' )
260
        ->header_like( Location => qr|^\/api\/v1\/bookings/\d*|, 'REST3.4.1' )->json_is( '/biblio_id' => $biblio->id )
266
        ->header_like( Location => qr|^\/api\/v1\/bookings/\d*|, 'REST3.4.1' )
267
        ->json_is( '/biblio_id' => $biblio->id )
268
        ->tx->res->json->{booking_id};
261
        ->tx->res->json->{booking_id};
269
262
270
    # Authorized attempt to create with null id
263
    # Authorized attempt to create with null id
Lines 277-284 subtest 'add() tests' => sub { Link Here
277
    $booking->{start_date} = output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 10 ) } );
270
    $booking->{start_date} = output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 10 ) } );
278
    $booking->{end_date}   = output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 14 ) } );
271
    $booking->{end_date}   = output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 14 ) } );
279
    warnings_like {
272
    warnings_like {
280
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )
273
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is(409)
281
            ->status_is(409)
282
            ->json_is( "/error" => "Duplicate booking_id" );
274
            ->json_is( "/error" => "Duplicate booking_id" );
283
    }
275
    }
284
    qr/DBD::mysql::st execute failed: Duplicate entry '(.*?)' for key '(.*\.?)PRIMARY'/;
276
    qr/DBD::mysql::st execute failed: Duplicate entry '(.*?)' for key '(.*\.?)PRIMARY'/;
Lines 346-353 subtest 'update() tests' => sub { Link Here
346
    };
338
    };
347
339
348
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_missing_field )
340
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_missing_field )
349
        ->status_is(400)
341
        ->status_is(400)->json_is( "/errors" => [ { message => "Missing property.", path => "/body/biblio_id" } ] );
350
        ->json_is( "/errors" => [ { message => "Missing property.", path => "/body/biblio_id" } ] );
351
342
352
    # Full object update on PUT
343
    # Full object update on PUT
353
    my $booking_with_updated_field = {
344
    my $booking_with_updated_field = {
Lines 360-367 subtest 'update() tests' => sub { Link Here
360
    };
351
    };
361
352
362
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_updated_field )
353
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_updated_field )
363
        ->status_is(200)
354
        ->status_is(200)->json_is( '/biblio_id' => $biblio->id );
364
        ->json_is( '/biblio_id' => $biblio->id );
365
355
366
    # Authorized attempt to write invalid data
356
    # Authorized attempt to write invalid data
367
    my $booking_with_invalid_field = {
357
    my $booking_with_invalid_field = {
Lines 375-382 subtest 'update() tests' => sub { Link Here
375
    };
365
    };
376
366
377
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_invalid_field )
367
    $t->put_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_invalid_field )
378
        ->status_is(400)
368
        ->status_is(400)->json_is(
379
        ->json_is(
380
        "/errors" => [
369
        "/errors" => [
381
            {
370
            {
382
                message => "Properties not allowed: blah.",
371
                message => "Properties not allowed: blah.",
Lines 445-452 subtest 'delete() tests' => sub { Link Here
445
    # Unauthorized attempt to delete
434
    # Unauthorized attempt to delete
446
    $t->delete_ok("//$unauth_userid:$password@/api/v1/bookings/$booking_id")->status_is(403);
435
    $t->delete_ok("//$unauth_userid:$password@/api/v1/bookings/$booking_id")->status_is(403);
447
436
448
    $t->delete_ok("//$userid:$password@/api/v1/bookings/$booking_id")
437
    $t->delete_ok("//$userid:$password@/api/v1/bookings/$booking_id")->status_is( 204, 'REST3.2.4' )
449
        ->status_is( 204, 'REST3.2.4' )
450
        ->content_is( '', 'REST3.3.4' );
438
        ->content_is( '', 'REST3.3.4' );
451
439
452
    $t->delete_ok("//$userid:$password@/api/v1/bookings/$booking_id")->status_is(404);
440
    $t->delete_ok("//$userid:$password@/api/v1/bookings/$booking_id")->status_is(404);
Lines 506-513 subtest 'patch() tests' => sub { Link Here
506
    };
494
    };
507
495
508
    $t->patch_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_invalid_field )
496
    $t->patch_ok( "//$userid:$password@/api/v1/bookings/$booking_id" => json => $booking_with_invalid_field )
509
        ->status_is(400)
497
        ->status_is(400)->json_is(
510
        ->json_is(
511
        "/errors" => [
498
        "/errors" => [
512
            {
499
            {
513
                message => "Properties not allowed: blah.",
500
                message => "Properties not allowed: blah.",
Lines 586-593 subtest 'add() with itemtype_id tests' => sub { Link Here
586
573
587
    my $tx =
574
    my $tx =
588
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_itemtype )
575
        $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_itemtype )
589
        ->status_is( 201, 'Created booking with itemtype_id' )
576
        ->status_is( 201, 'Created booking with itemtype_id' )->json_has( '/item_id', 'Server assigned an item_id' )
590
        ->json_has( '/item_id', 'Server assigned an item_id' )
591
        ->json_is( '/biblio_id' => $biblio->id );
577
        ->json_is( '/biblio_id' => $biblio->id );
592
578
593
    my $assigned_item_id = $tx->tx->res->json->{item_id};
579
    my $assigned_item_id = $tx->tx->res->json->{item_id};
Lines 607-614 subtest 'add() with itemtype_id tests' => sub { Link Here
607
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 14 ) } ),
593
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 14 ) } ),
608
    };
594
    };
609
595
610
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_both )
596
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_both )->status_is(400)
611
        ->status_is(400)
612
        ->json_is( '/error' => 'Cannot specify both item_id and itemtype_id' );
597
        ->json_is( '/error' => 'Cannot specify both item_id and itemtype_id' );
613
598
614
    # Test 3: Booking with neither item_id nor itemtype_id should fail
599
    # Test 3: Booking with neither item_id nor itemtype_id should fail
Lines 620-627 subtest 'add() with itemtype_id tests' => sub { Link Here
620
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 24 ) } ),
605
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 24 ) } ),
621
    };
606
    };
622
607
623
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_neither )
608
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_with_neither )->status_is(400)
624
        ->status_is(400)
625
        ->json_is( '/error' => 'Either item_id or itemtype_id must be provided' );
609
        ->json_is( '/error' => 'Either item_id or itemtype_id must be provided' );
626
610
627
    # Test 4: Verify optimal selection - book all items, then try to book again
611
    # Test 4: Verify optimal selection - book all items, then try to book again
Lines 648-655 subtest 'add() with itemtype_id tests' => sub { Link Here
648
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 5 ) } ),
632
        end_date          => output_pref( { dateformat => "rfc3339", dt => dt_from_string->add( days => 5 ) } ),
649
    };
633
    };
650
634
651
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_should_fail )
635
    $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking_should_fail )->status_is(400)
652
        ->status_is(400)
653
        ->json_is( '/error' => 'Booking would conflict' );
636
        ->json_is( '/error' => 'Booking would conflict' );
654
637
655
    $schema->storage->txn_rollback;
638
    $schema->storage->txn_rollback;
(-)a/tags/list.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Biblio qw( GetBiblioData );
24
use C4::Biblio qw( GetBiblioData );
(-)a/tags/review.pl (-2 / +2 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use POSIX qw( ceil );
23
use POSIX qw( ceil );
24
use CGI   qw ( -utf8 );
24
use CGI   qw( -utf8 );
25
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
25
use CGI::Cookie;    # need to check cookies before having CGI parse the POST request
26
use URI::Escape qw( uri_escape_utf8 uri_unescape );
26
use URI::Escape qw( uri_escape_utf8 uri_unescape );
27
use C4::Auth    qw( check_cookie_auth get_template_and_user );
27
use C4::Auth    qw( check_cookie_auth get_template_and_user );
Lines 110-116 if ( $op eq 'cud-approve' ) { Link Here
110
    $template->param(
110
    $template->param(
111
        test_term => $tag,
111
        test_term => $tag,
112
        (
112
        (
113
              $check >=  1 ? 'verdict_ok'
113
              $check >= 1  ? 'verdict_ok'
114
            : $check <= -1 ? 'verdict_rej'
114
            : $check <= -1 ? 'verdict_rej'
115
            :                'verdict_indeterminate'
115
            :                'verdict_indeterminate'
116
        ) => 1,
116
        ) => 1,
(-)a/tools/additional-contents.pl (-1 / +1 lines)
Lines 23-29 Link Here
23
# along with Koha; if not, see <https://www.gnu.org/licenses>.
23
# along with Koha; if not, see <https://www.gnu.org/licenses>.
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw( -utf8 );
27
use Try::Tiny;
27
use Try::Tiny;
28
use Array::Utils qw( array_minus );
28
use Array::Utils qw( array_minus );
29
use C4::Auth     qw(get_template_and_user);
29
use C4::Auth     qw(get_template_and_user);
(-)a/tools/ajax-inventory.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       qw ( -utf8 );
4
use CGI       qw( -utf8 );
5
use C4::Auth  qw( check_api_auth );
5
use C4::Auth  qw( check_api_auth );
6
use C4::Items qw( ModDateLastSeen );
6
use C4::Items qw( ModDateLastSeen );
7
7
(-)a/tools/batchMod.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use Modern::Perl;
21
use Modern::Perl;
22
use Try::Tiny qw( catch try );
22
use Try::Tiny qw( catch try );
23
23
(-)a/tools/batch_records_ajax.pl (-1 / +1 lines)
Lines 31-37 the records from an import batch. Link Here
31
31
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI  qw ( -utf8 );
34
use CGI  qw( -utf8 );
35
use JSON qw( to_json );
35
use JSON qw( to_json );
36
36
37
use C4::Context;
37
use C4::Context;
(-)a/tools/cleanborrowers.pl (-1 / +1 lines)
Lines 33-39 This script allows to do 2 things. Link Here
33
33
34
use Modern::Perl;
34
use Modern::Perl;
35
35
36
use CGI         qw ( -utf8 );
36
use CGI         qw( -utf8 );
37
use C4::Auth    qw( get_template_and_user );
37
use C4::Auth    qw( get_template_and_user );
38
use C4::Output  qw( output_html_with_http_headers );
38
use C4::Output  qw( output_html_with_http_headers );
39
use C4::Members qw( GetBorrowersToExpunge );
39
use C4::Members qw( GetBorrowersToExpunge );
(-)a/tools/copy-holidays.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
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 C4::Output;
25
use C4::Output;
(-)a/tools/csv-profiles.pl (-1 / +1 lines)
Lines 40-46 use Encode; Link Here
40
use C4::Auth qw( get_template_and_user );
40
use C4::Auth qw( get_template_and_user );
41
use C4::Context;
41
use C4::Context;
42
use C4::Output qw( output_html_with_http_headers );
42
use C4::Output qw( output_html_with_http_headers );
43
use CGI        qw ( -utf8 );
43
use CGI        qw( -utf8 );
44
use Koha::CsvProfiles;
44
use Koha::CsvProfiles;
45
45
46
my $input            = CGI->new;
46
my $input            = CGI->new;
(-)a/tools/exceptionHolidays.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw( -utf8 );
6
6
7
use C4::Auth qw( checkauth );
7
use C4::Auth qw( checkauth );
8
use C4::Output;
8
use C4::Output;
(-)a/tools/export.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw( -utf8 );
21
use MARC::File::XML;
21
use MARC::File::XML;
22
use List::MoreUtils qw( uniq );
22
use List::MoreUtils qw( uniq );
23
use C4::Auth        qw( get_template_and_user );
23
use C4::Auth        qw( get_template_and_user );
(-)a/tools/holidays.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
#####Sets holiday periods for each branch. Datedues will be extended if branch is closed -TG
18
#####Sets holiday periods for each branch. Datedues will be extended if branch is closed -TG
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth   qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
(-)a/tools/import_borrowers.pl (-1 / +1 lines)
Lines 52-58 my $Import = Koha::Patrons::Import->new(); Link Here
52
52
53
use Text::CSV;
53
use Text::CSV;
54
54
55
use CGI qw ( -utf8 );
55
use CGI qw( -utf8 );
56
56
57
my $extended = C4::Context->preference('ExtendedPatronAttributes');
57
my $extended = C4::Context->preference('ExtendedPatronAttributes');
58
58
(-)a/tools/inventory.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
#need to open cgi and get the fh before anything else opens a new cgi context (see C4::Auth)
23
#need to open cgi and get the fh before anything else opens a new cgi context (see C4::Auth)
24
use CGI qw ( -utf8 );
24
use CGI qw( -utf8 );
25
my $input          = CGI->new;
25
my $input          = CGI->new;
26
my $uploadbarcodes = $input->param('uploadbarcodes');
26
my $uploadbarcodes = $input->param('uploadbarcodes');
27
my $barcodelist    = $input->param('barcodelist');
27
my $barcodelist    = $input->param('barcodelist');
(-)a/tools/letter.pl (-1 / +1 lines)
Lines 41-47 Link Here
41
# The DB interaction should be handled by calls to C4/Letters.pm
41
# The DB interaction should be handled by calls to C4/Letters.pm
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use CGI qw ( -utf8 );
44
use CGI qw( -utf8 );
45
use Try::Tiny;
45
use Try::Tiny;
46
46
47
use C4::Auth qw( get_template_and_user );
47
use C4::Auth qw( get_template_and_user );
(-)a/tools/manage-marc-import.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
# standard or CPAN modules used
22
# standard or CPAN modules used
23
use CGI qw ( -utf8 );
23
use CGI qw( -utf8 );
24
use CGI::Cookie;
24
use CGI::Cookie;
25
use MARC::File::USMARC;
25
use MARC::File::USMARC;
26
use Try::Tiny;
26
use Try::Tiny;
(-)a/tools/marc_modification_templates.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth                      qw( get_template_and_user );
23
use C4::Auth                      qw( get_template_and_user );
24
use C4::Output                    qw( output_html_with_http_headers );
24
use C4::Output                    qw( output_html_with_http_headers );
(-)a/tools/modborrowers.pl (-1 / +1 lines)
Lines 26-32 Link Here
26
# And for patron attributes.
26
# And for patron attributes.
27
27
28
use Modern::Perl;
28
use Modern::Perl;
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::Koha qw( GetAuthorisedValues );
31
use C4::Koha qw( GetAuthorisedValues );
32
use C4::Members;
32
use C4::Members;
(-)a/tools/newHolidays.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
22
23
use C4::Auth qw( checkauth );
23
use C4::Auth qw( checkauth );
24
use C4::Output;
24
use C4::Output;
(-)a/tools/overduerules.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::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 );
(-)a/tools/page.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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::AdditionalContents;
23
use Koha::AdditionalContents;
(-)a/tools/picture-upload.pl (-1 / +1 lines)
Lines 22-28 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use File::Temp;
24
use File::Temp;
25
use CGI qw ( -utf8 );
25
use CGI qw( -utf8 );
26
use GD;
26
use GD;
27
use MIME::Base64;
27
use MIME::Base64;
28
use Cwd;
28
use Cwd;
(-)a/tools/problem-reports.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
(-)a/tools/quotes-upload.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
25
use C4::Auth qw( get_template_and_user );
25
use C4::Auth qw( get_template_and_user );
(-)a/tools/quotes.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI       qw ( -utf8 );
20
use CGI       qw( -utf8 );
21
use Try::Tiny qw( catch try );
21
use Try::Tiny qw( catch try );
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
(-)a/tools/scheduler.pl (-1 / +1 lines)
Lines 22-28 use C4::Context; Link Here
22
use C4::Scheduler       qw( add_at_job get_jobs remove_at_job );
22
use C4::Scheduler       qw( add_at_job get_jobs remove_at_job );
23
use C4::Reports::Guided qw( get_saved_reports );
23
use C4::Reports::Guided qw( get_saved_reports );
24
use C4::Auth            qw( get_template_and_user );
24
use C4::Auth            qw( get_template_and_user );
25
use CGI                 qw ( -utf8 );
25
use CGI                 qw( -utf8 );
26
use C4::Output          qw( output_html_with_http_headers );
26
use C4::Output          qw( output_html_with_http_headers );
27
use Koha::DateUtils     qw( dt_from_string );
27
use Koha::DateUtils     qw( dt_from_string );
28
use Koha::Reports;
28
use Koha::Reports;
(-)a/tools/stage-marc-import.pl (-1 / +1 lines)
Lines 27-33 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
28
29
# standard or CPAN modules used
29
# standard or CPAN modules used
30
use CGI qw ( -utf8 );
30
use CGI qw( -utf8 );
31
use CGI::Cookie;
31
use CGI::Cookie;
32
use MARC::File::USMARC;
32
use MARC::File::USMARC;
33
use Try::Tiny;
33
use Try::Tiny;
(-)a/tools/tools-home.pl (-1 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
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 C4::Tags   qw( get_count_by_tag_status );
23
use C4::Tags   qw( get_count_by_tag_status );
(-)a/tools/upload-cover-image.pl (-1 / +1 lines)
Lines 41-47 use Modern::Perl; Link Here
41
use Cwd;
41
use Cwd;
42
42
43
use File::Temp;
43
use File::Temp;
44
use CGI qw ( -utf8 );
44
use CGI qw( -utf8 );
45
use GD;
45
use GD;
46
use C4::Context;
46
use C4::Context;
47
use C4::Auth   qw( get_template_and_user );
47
use C4::Auth   qw( get_template_and_user );
(-)a/tools/upload-file.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use CGI::Cookie;
23
use CGI::Cookie;
24
use Encode;
24
use Encode;
25
use JSON;
25
use JSON;
(-)a/tools/viewlog.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth qw( get_template_and_user );
23
use C4::Auth qw( get_template_and_user );
24
use CGI      qw ( -utf8 );
24
use CGI      qw( -utf8 );
25
use JSON;
25
use JSON;
26
use Text::CSV::Encoded;
26
use Text::CSV::Encoded;
27
use C4::Context;
27
use C4::Context;
(-)a/virtualshelves/addbybiblionumber.pl (-1 / +1 lines)
Lines 57-63 addbybiblionumber.pl Link Here
57
57
58
use Modern::Perl;
58
use Modern::Perl;
59
59
60
use CGI        qw ( -utf8 );
60
use CGI        qw( -utf8 );
61
use C4::Output qw( output_html_with_http_headers );
61
use C4::Output qw( output_html_with_http_headers );
62
use C4::Auth   qw( get_template_and_user );
62
use C4::Auth   qw( get_template_and_user );
63
63
(-)a/virtualshelves/downloadshelf.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth   qw( get_template_and_user );
24
use C4::Auth   qw( get_template_and_user );
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
(-)a/virtualshelves/sendshelf.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw( -utf8 );
23
use Encode;
23
use Encode;
24
use Carp      qw( carp );
24
use Carp      qw( carp );
25
use Try::Tiny qw( catch try );
25
use Try::Tiny qw( catch try );
(-)a/virtualshelves/shelves.pl (-2 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
18
# along with Koha; if not, see <https://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI             qw ( -utf8 );
21
use CGI             qw( -utf8 );
22
use C4::Auth        qw( get_template_and_user haspermission );
22
use C4::Auth        qw( get_template_and_user haspermission );
23
use C4::Circulation qw( barcodedecode );
23
use C4::Circulation qw( barcodedecode );
24
use C4::Context;
24
use C4::Context;
25
- 

Return to bug 42092