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

(-)a/C4/Accounts.pm (-11 / +9 lines)
Lines 18-23 package C4::Accounts; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT = qw(
25
        chargelostitem
26
        purge_zero_balance_fees
27
    );
28
}
29
21
use C4::Context;
30
use C4::Context;
22
use C4::Stats;
31
use C4::Stats;
23
use C4::Members;
32
use C4::Members;
Lines 26-42 use Koha::Account::Lines; Link Here
26
use Koha::Account::Offsets;
35
use Koha::Account::Offsets;
27
use Koha::Items;
36
use Koha::Items;
28
37
29
use vars qw(@ISA @EXPORT);
30
31
BEGIN {
32
    require Exporter;
33
    @ISA    = qw(Exporter);
34
    @EXPORT = qw(
35
        chargelostitem
36
        purge_zero_balance_fees
37
    );
38
}
39
40
=head1 NAME
38
=head1 NAME
41
39
42
C4::Accounts - Functions for dealing with Koha accounts
40
C4::Accounts - Functions for dealing with Koha accounts
(-)a/C4/Acquisition.pm (-31 / +29 lines)
Lines 18-56 package C4::Acquisition; 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 Carp qw( carp croak );
21
use base 'Exporter';
22
use Text::CSV_XS;
23
use C4::Context;
24
use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
25
use C4::Biblio      qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
26
use C4::Contract    qw( GetContract );
27
use C4::Log         qw( logaction );
28
use C4::Templates   qw(gettemplate);
29
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Acquisition::Baskets;
31
use Koha::Acquisition::Booksellers;
32
use Koha::Acquisition::Invoices;
33
use Koha::Acquisition::Orders;
34
use Koha::AdditionalFieldValue;
35
use Koha::Biblios;
36
use Koha::Exceptions;
37
use Koha::Items;
38
use Koha::Number::Price;
39
use Koha::Libraries;
40
use Koha::CsvProfiles;
41
use Koha::Patrons;
42
43
use C4::Koha;
44
45
use MARC::Field;
46
use JSON qw( to_json );
47
48
our ( @ISA, @EXPORT_OK );
49
22
50
BEGIN {
23
BEGIN {
51
    require Exporter;
24
    our @EXPORT_OK = qw(
52
    @ISA       = qw(Exporter);
53
    @EXPORT_OK = qw(
54
        GetBasket NewBasket ReopenBasket ModBasket
25
        GetBasket NewBasket ReopenBasket ModBasket
55
        GetBasketAsCSV GetBasketGroupAsCSV
26
        GetBasketAsCSV GetBasketGroupAsCSV
56
        GetBasketsByBookseller GetBasketsByBasketgroup
27
        GetBasketsByBookseller GetBasketsByBasketgroup
Lines 95-100 BEGIN { Link Here
95
    );
66
    );
96
}
67
}
97
68
69
use Carp qw( carp croak );
70
use Text::CSV_XS;
71
use C4::Context;
72
use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
73
use C4::Biblio      qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
74
use C4::Contract    qw( GetContract );
75
use C4::Log         qw( logaction );
76
use C4::Templates   qw(gettemplate);
77
use Koha::DateUtils qw( dt_from_string );
78
use Koha::Acquisition::Baskets;
79
use Koha::Acquisition::Booksellers;
80
use Koha::Acquisition::Invoices;
81
use Koha::Acquisition::Orders;
82
use Koha::AdditionalFieldValue;
83
use Koha::Biblios;
84
use Koha::Exceptions;
85
use Koha::Items;
86
use Koha::Number::Price;
87
use Koha::Libraries;
88
use Koha::CsvProfiles;
89
use Koha::Patrons;
90
91
use C4::Koha;
92
93
use MARC::Field;
94
use JSON qw( to_json );
95
98
=head1 NAME
96
=head1 NAME
99
97
100
C4::Acquisition - Koha functions for dealing with orders and acquisitions
98
C4::Acquisition - Koha functions for dealing with orders and acquisitions
(-)a/C4/Auth.pm (-13 / +12 lines)
Lines 17-24 package C4::Auth; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
26
        get_all_subpermissions get_cataloguing_page_permissions get_user_subpermissions in_iprange
27
        get_template_and_user haspermission create_basic_session
28
    );
29
}
30
22
use Carp qw( croak );
31
use Carp qw( croak );
23
32
24
use Digest::MD5 qw( md5_base64 );
33
use Digest::MD5 qw( md5_base64 );
Lines 60-79 use Koha::Session; Link Here
60
# use utf8;
69
# use utf8;
61
70
62
use vars qw($ldap $cas $caslogout);
71
use vars qw($ldap $cas $caslogout);
63
our ( @ISA, @EXPORT_OK );
64
72
65
BEGIN {
73
BEGIN {
66
    C4::Context->set_remote_address;
74
    C4::Context->set_remote_address;
67
75
68
    require Exporter;
69
    @ISA = qw(Exporter);
70
71
    @EXPORT_OK = qw(
72
        checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
73
        get_all_subpermissions get_cataloguing_page_permissions get_user_subpermissions in_iprange
74
        get_template_and_user haspermission create_basic_session
75
    );
76
77
    $cas       = C4::Context->preference('casAuthentication');
76
    $cas       = C4::Context->preference('casAuthentication');
78
    $caslogout = C4::Context->preference('casLogout');
77
    $caslogout = C4::Context->preference('casLogout');
79
78
Lines 1446-1452 sub checkauth { Link Here
1446
    # get the inputs from the incoming query
1445
    # get the inputs from the incoming query
1447
    my @inputs          = ();
1446
    my @inputs          = ();
1448
    my @inputs_to_clean = qw( login_userid login_password ticket logout.x otp_token );
1447
    my @inputs_to_clean = qw( login_userid login_password ticket logout.x otp_token );
1449
    foreach my $name ( param $query) {
1448
    foreach my $name ( param $query ) {
1450
        next if grep { $name eq $_ } @inputs_to_clean;
1449
        next if grep { $name eq $_ } @inputs_to_clean;
1451
        my @value = $query->multi_param($name);
1450
        my @value = $query->multi_param($name);
1452
        push @inputs, { name => $name, value => $_ } for @value;
1451
        push @inputs, { name => $name, value => $_ } for @value;
(-)a/C4/Auth_with_cas.pm (-10 / +7 lines)
Lines 17-24 package C4::Auth_with_cas; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK =
25
        qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth);
26
}
22
27
23
use C4::Context;
28
use C4::Context;
24
use Koha::AuthUtils qw( get_script_name );
29
use Koha::AuthUtils qw( get_script_name );
Lines 29-42 use URI::Escape; Link Here
29
34
30
use Koha::Logger;
35
use Koha::Logger;
31
36
32
our ( @ISA, @EXPORT_OK );
33
34
BEGIN {
35
    require Exporter;
36
    @ISA = qw(Exporter);
37
    @EXPORT_OK =
38
        qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth);
39
}
40
my $defaultcasserver;
37
my $defaultcasserver;
41
my $casservers;
38
my $casservers;
42
my $yamlauthfile = C4::Context->config('intranetdir') . "/C4/Auth_cas_servers.yaml";
39
my $yamlauthfile = C4::Context->config('intranetdir') . "/C4/Auth_cas_servers.yaml";
(-)a/C4/Auth_with_ldap.pm (-8 / +6 lines)
Lines 18-23 package C4::Auth_with_ldap; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw( checkpw_ldap );
25
}
26
21
use Carp qw( croak );
27
use Carp qw( croak );
22
28
23
use C4::Context;
29
use C4::Context;
Lines 29-42 use Koha::AuthUtils qw( hash_password ); Link Here
29
use Net::LDAP;
35
use Net::LDAP;
30
use Net::LDAP::Filter;
36
use Net::LDAP::Filter;
31
37
32
our ( @ISA, @EXPORT_OK );
33
34
BEGIN {
35
    require Exporter;
36
    @ISA       = qw(Exporter);
37
    @EXPORT_OK = qw( checkpw_ldap );
38
}
39
40
# Redefine checkpw_ldap:
38
# Redefine checkpw_ldap:
41
# connect to LDAP (named or anonymous)
39
# connect to LDAP (named or anonymous)
42
# ~ retrieves $userid from KOHA_CONF mapping
40
# ~ retrieves $userid from KOHA_CONF mapping
(-)a/C4/Auth_with_shibboleth.pm (-9 / +6 lines)
Lines 18-23 package C4::Auth_with_shibboleth; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
25
}
21
26
22
use C4::Context;
27
use C4::Context;
23
use Koha::AuthUtils qw( get_script_name );
28
use Koha::AuthUtils qw( get_script_name );
Lines 30-43 use List::MoreUtils qw( any ); Link Here
30
35
31
use Koha::Logger;
36
use Koha::Logger;
32
37
33
our ( @ISA, @EXPORT_OK );
34
35
BEGIN {
36
    require Exporter;
37
    @ISA       = qw(Exporter);
38
    @EXPORT_OK = qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
39
}
40
41
# Check that shib config is not malformed
38
# Check that shib config is not malformed
42
39
43
sub shib_ok {
40
sub shib_ok {
Lines 158-164 sub _autocreate { Link Here
158
                module      => 'members',
155
                module      => 'members',
159
                letter_code => 'WELCOME',
156
                letter_code => 'WELCOME',
160
                branchcode  => $patron->branchcode,
157
                branchcode  => $patron->branchcode,
161
                ,
158
162
                lang   => $patron->lang || 'default',
159
                lang   => $patron->lang || 'default',
163
                tables => {
160
                tables => {
164
                    'branches'  => $patron->branchcode,
161
                    'branches'  => $patron->branchcode,
(-)a/C4/AuthoritiesMarc.pm (-31 / +27 lines)
Lines 18-55 package C4::AuthoritiesMarc; 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
20
21
use strict;
21
use Modern::Perl;
22
use warnings;
22
use base 'Exporter';
23
use MARC::Field;
24
use Scalar::Util qw(blessed);
25
use Try::Tiny    qw( try catch );
26
27
use C4::Context;
28
use C4::Biblio qw( ModBiblio );
29
use C4::Search qw( FindDuplicate new_record_from_zebra );
30
use C4::AuthoritiesMarc::MARC21;
31
use C4::AuthoritiesMarc::UNIMARC;
32
use C4::Charset qw( SetUTF8Flag );
33
use C4::Log     qw( logaction );
34
use Koha::MetadataRecord::Authority;
35
use Koha::Authorities;
36
use Koha::Authority::MergeRequests;
37
use Koha::Authority::Types;
38
use Koha::Authority;
39
use Koha::Database;
40
use Koha::Libraries;
41
use Koha::RecordProcessor;
42
use Koha::SearchEngine;
43
use Koha::SearchEngine::Indexer;
44
use Koha::SearchEngine::Search;
45
46
our ( @ISA, @EXPORT_OK );
47
23
48
BEGIN {
24
BEGIN {
49
25
    our @EXPORT_OK = qw(
50
    require Exporter;
51
    @ISA       = qw(Exporter);
52
    @EXPORT_OK = qw(
53
        GetTagsLabels
26
        GetTagsLabels
54
        GetAuthMARCFromKohaField
27
        GetAuthMARCFromKohaField
55
28
Lines 79-84 BEGIN { Link Here
79
    );
52
    );
80
}
53
}
81
54
55
use MARC::Field;
56
use Scalar::Util qw(blessed);
57
use Try::Tiny    qw( try catch );
58
59
use C4::Context;
60
use C4::Biblio qw( ModBiblio );
61
use C4::Search qw( FindDuplicate new_record_from_zebra );
62
use C4::AuthoritiesMarc::MARC21;
63
use C4::AuthoritiesMarc::UNIMARC;
64
use C4::Charset qw( SetUTF8Flag );
65
use C4::Log     qw( logaction );
66
use Koha::MetadataRecord::Authority;
67
use Koha::Authorities;
68
use Koha::Authority::MergeRequests;
69
use Koha::Authority::Types;
70
use Koha::Authority;
71
use Koha::Database;
72
use Koha::Libraries;
73
use Koha::RecordProcessor;
74
use Koha::SearchEngine;
75
use Koha::SearchEngine::Indexer;
76
use Koha::SearchEngine::Search;
77
82
=head1 NAME
78
=head1 NAME
83
79
84
C4::AuthoritiesMarc
80
C4::AuthoritiesMarc
Lines 532-538 ORDER BY tagfield, display_order, tagsubfield" Link Here
532
528
533
    while (
529
    while (
534
        (
530
        (
535
            $tag,           $subfield,     $liblibrarian,,    $libopac, $tab,
531
            $tag,           $subfield,     $liblibrarian,     $libopac, $tab,
536
            $mandatory,     $repeatable,   $authorised_value, $authtypecode,
532
            $mandatory,     $repeatable,   $authorised_value, $authtypecode,
537
            $value_builder, $kohafield,    $seealso,          $hidden,
533
            $value_builder, $kohafield,    $seealso,          $hidden,
538
            $isurl,         $defaultvalue, $display_order
534
            $isurl,         $defaultvalue, $display_order
(-)a/C4/Biblio.pm (-6 / +2 lines)
Lines 20-33 package C4::Biblio; 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
23
use base 'Exporter';
24
use vars qw(@ISA @EXPORT_OK);
25
24
26
BEGIN {
25
BEGIN {
27
    require Exporter;
26
    our @EXPORT_OK = qw(
28
    @ISA = qw(Exporter);
29
30
    @EXPORT_OK = qw(
31
        AddBiblio
27
        AddBiblio
32
        GetBiblioData
28
        GetBiblioData
33
        GetISBDView
29
        GetISBDView
(-)a/C4/Breeding.pm (-10 / +6 lines)
Lines 18-25 package C4::Breeding; 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
20
21
use strict;
21
use Modern::Perl;
22
use warnings;
22
use base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(BreedingSearch ImportBreedingAuth Z3950Search Z3950SearchAuth);
26
}
23
27
24
use C4::Biblio  qw(TransformMarcToKoha);
28
use C4::Biblio  qw(TransformMarcToKoha);
25
use C4::Koha    qw( GetVariationsOfISBN );
29
use C4::Koha    qw( GetVariationsOfISBN );
Lines 32-45 use C4::Languages; Link Here
32
use Koha::Database;
36
use Koha::Database;
33
use Koha::XSLT::Base;
37
use Koha::XSLT::Base;
34
38
35
our ( @ISA, @EXPORT_OK );
36
37
BEGIN {
38
    require Exporter;
39
    @ISA       = qw(Exporter);
40
    @EXPORT_OK = qw(BreedingSearch ImportBreedingAuth Z3950Search Z3950SearchAuth);
41
}
42
43
=head1 NAME
39
=head1 NAME
44
40
45
C4::Breeding : module to add biblios to import_records via
41
C4::Breeding : module to add biblios to import_records via
(-)a/C4/Budgets.pm (-12 / +10 lines)
Lines 18-37 package C4::Budgets; 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 JSON;
21
use base 'Exporter';
22
use C4::Context;
23
use Koha::Database;
24
use Koha::Patrons;
25
use Koha::Acquisition::Invoice::Adjustments;
26
use C4::Acquisition;
27
use C4::Log qw(logaction);
28
29
our ( @ISA, @EXPORT_OK );
30
22
31
BEGIN {
23
BEGIN {
32
    require Exporter;
24
    our @EXPORT_OK = qw(
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
25
36
        GetBudget
26
        GetBudget
37
        GetBudgetByOrderNumber
27
        GetBudgetByOrderNumber
Lines 84-89 BEGIN { Link Here
84
    );
74
    );
85
}
75
}
86
76
77
use JSON;
78
use C4::Context;
79
use Koha::Database;
80
use Koha::Patrons;
81
use Koha::Acquisition::Invoice::Adjustments;
82
use C4::Acquisition;
83
use C4::Log qw(logaction);
84
87
# ----------------------------BUDGETS.PM-----------------------------";
85
# ----------------------------BUDGETS.PM-----------------------------";
88
86
89
=head1 FUNCTIONS ABOUT BUDGETS
87
=head1 FUNCTIONS ABOUT BUDGETS
(-)a/C4/Charset.pm (-12 / +9 lines)
Lines 18-37 package C4::Charset; 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
21
use base 'Exporter';
22
use MARC::Charset;
23
use Text::Iconv;
24
use Unicode::Normalize qw( NFC NFD );
25
use Encode;
26
27
use Koha::Logger;
28
29
our ( @ISA, @EXPORT_OK );
30
22
31
BEGIN {
23
BEGIN {
32
    require Exporter;
24
    our @EXPORT_OK = qw(
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
        NormalizeString
25
        NormalizeString
36
        IsStringUTF8ish
26
        IsStringUTF8ish
37
        MarcToUTF8Record
27
        MarcToUTF8Record
Lines 43-48 BEGIN { Link Here
43
    );
33
    );
44
}
34
}
45
35
36
use MARC::Charset;
37
use Text::Iconv;
38
use Unicode::Normalize qw( NFC NFD );
39
use Encode;
40
41
use Koha::Logger;
42
46
=encoding UTF-8
43
=encoding UTF-8
47
44
48
=head1 NAME
45
=head1 NAME
(-)a/C4/Circulation.pm (-55 / +54 lines)
Lines 19-84 package C4::Circulation; 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 DateTime;
23
use POSIX qw( floor );
24
use Encode;
25
use Try::Tiny;
26
use JSON;
27
28
use C4::Context;
29
use C4::Stats qw( UpdateStats );
30
use C4::Reserves
31
    qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority IsAvailableForItemLevelRequest );
32
use C4::Biblio qw( UpdateTotalIssues );
33
use C4::Items  qw( ModItemTransfer ModDateLastSeen CartToShelf );
34
use C4::Accounts;
35
use C4::ItemCirculationAlertPreference;
36
use C4::Message;
37
use C4::Log qw( logaction );    # logaction
38
use C4::Overdues;
39
use C4::RotatingCollections qw(GetCollectionItemBranches);
40
use Algorithm::CheckDigits  qw( CheckDigits );
41
22
42
use Data::Dumper qw( Dumper );
23
use base 'Exporter';
43
use Koha::Account;
44
use Koha::AuthorisedValues;
45
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
46
use Koha::Biblioitems;
47
use Koha::DateUtils qw( dt_from_string );
48
use Koha::Calendar;
49
use Koha::Checkouts;
50
use Koha::ILL::Requests;
51
use Koha::Items;
52
use Koha::Patrons;
53
use Koha::Patron::Debarments qw( DelUniqueDebarment AddUniqueDebarment );
54
use Koha::Database;
55
use Koha::Libraries;
56
use Koha::Account::Lines;
57
use Koha::Holds;
58
use Koha::Account::Lines;
59
use Koha::Account::Offsets;
60
use Koha::Config::SysPrefs;
61
use Koha::Charges::Fees;
62
use Koha::Config::SysPref;
63
use Koha::Checkouts::ReturnClaims;
64
use Koha::SearchEngine::Indexer;
65
use Koha::Exceptions::Checkout;
66
use Koha::Plugins;
67
use Koha::Recalls;
68
use Koha::Library::Hours;
69
use Carp            qw( carp );
70
use List::MoreUtils qw( any );
71
use Scalar::Util    qw( looks_like_number blessed );
72
use Date::Calc      qw( Date_to_Days );
73
our ( @ISA, @EXPORT_OK );
74
24
75
BEGIN {
25
BEGIN {
76
26
77
    require Exporter;
78
    @ISA = qw(Exporter);
79
80
    # FIXME subs that should probably be elsewhere
27
    # FIXME subs that should probably be elsewhere
81
    push @EXPORT_OK, qw(
28
    our @EXPORT_OK = qw(
82
        barcodedecode
29
        barcodedecode
83
        LostItem
30
        LostItem
84
        ReturnLostItem
31
        ReturnLostItem
Lines 129-134 BEGIN { Link Here
129
    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
76
    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
130
}
77
}
131
78
79
use DateTime;
80
use POSIX qw( floor );
81
use Encode;
82
use Try::Tiny;
83
use JSON;
84
85
use C4::Context;
86
use C4::Stats qw( UpdateStats );
87
use C4::Reserves
88
    qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority IsAvailableForItemLevelRequest );
89
use C4::Biblio qw( UpdateTotalIssues );
90
use C4::Items  qw( ModItemTransfer ModDateLastSeen CartToShelf );
91
use C4::Accounts;
92
use C4::ItemCirculationAlertPreference;
93
use C4::Message;
94
use C4::Log qw( logaction );    # logaction
95
use C4::Overdues;
96
use C4::RotatingCollections qw(GetCollectionItemBranches);
97
use Algorithm::CheckDigits  qw( CheckDigits );
98
99
use Data::Dumper qw( Dumper );
100
use Koha::Account;
101
use Koha::AuthorisedValues;
102
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
103
use Koha::Biblioitems;
104
use Koha::DateUtils qw( dt_from_string );
105
use Koha::Calendar;
106
use Koha::Checkouts;
107
use Koha::ILL::Requests;
108
use Koha::Items;
109
use Koha::Patrons;
110
use Koha::Patron::Debarments qw( DelUniqueDebarment AddUniqueDebarment );
111
use Koha::Database;
112
use Koha::Libraries;
113
use Koha::Account::Lines;
114
use Koha::Holds;
115
use Koha::Account::Lines;
116
use Koha::Account::Offsets;
117
use Koha::Config::SysPrefs;
118
use Koha::Charges::Fees;
119
use Koha::Config::SysPref;
120
use Koha::Checkouts::ReturnClaims;
121
use Koha::SearchEngine::Indexer;
122
use Koha::Exceptions::Checkout;
123
use Koha::Plugins;
124
use Koha::Recalls;
125
use Koha::Library::Hours;
126
use Carp            qw( carp );
127
use List::MoreUtils qw( any );
128
use Scalar::Util    qw( looks_like_number blessed );
129
use Date::Calc      qw( Date_to_Days );
130
132
=head1 NAME
131
=head1 NAME
133
132
134
C4::Circulation - Koha circulation module
133
C4::Circulation - Koha circulation module
(-)a/C4/ClassSortRoutine.pm (-7 / +4 lines)
Lines 18-37 package C4::ClassSortRoutine; 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
21
use base 'Exporter';
22
use Class::Factory::Util;
23
24
our ( @ISA, @EXPORT_OK );
25
22
26
BEGIN {
23
BEGIN {
27
    require Exporter;
24
    our @EXPORT_OK = qw(
28
    @ISA       = qw(Exporter);
29
    @EXPORT_OK = qw(
30
        GetSortRoutineNames
25
        GetSortRoutineNames
31
        GetClassSortKey
26
        GetClassSortKey
32
    );
27
    );
33
}
28
}
34
29
30
use Class::Factory::Util;
31
35
=head1 NAME 
32
=head1 NAME 
36
33
37
C4::ClassSortRoutine - base object for creation of classification sorting
34
C4::ClassSortRoutine - base object for creation of classification sorting
(-)a/C4/ClassSource.pm (-10 / +7 lines)
Lines 17-34 package C4::ClassSource; 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
20
use base 'Exporter';
21
use C4::Context;
22
use C4::ClassSortRoutine qw( GetClassSortKey );
23
24
use Koha::Cache::Memory::Lite;
25
26
our ( @ISA, @EXPORT_OK );
27
21
28
BEGIN {
22
BEGIN {
29
    require Exporter;
23
    our @EXPORT_OK = qw(
30
    @ISA       = qw(Exporter);
31
    @EXPORT_OK = qw(
32
        GetClassSources
24
        GetClassSources
33
        GetClassSource
25
        GetClassSource
34
        GetClassSortRule
26
        GetClassSortRule
Lines 36-41 BEGIN { Link Here
36
    );
28
    );
37
}
29
}
38
30
31
use C4::Context;
32
use C4::ClassSortRoutine qw( GetClassSortKey );
33
34
use Koha::Cache::Memory::Lite;
35
39
=head1 NAME
36
=head1 NAME
40
37
41
C4::ClassSources - handle classification sources in Koha
38
C4::ClassSources - handle classification sources in Koha
(-)a/C4/ClassSplitRoutine.pm (-7 / +4 lines)
Lines 18-36 package C4::ClassSplitRoutine; 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
21
use base 'Exporter';
22
use Class::Factory::Util;
23
24
our ( @ISA, @EXPORT_OK );
25
22
26
BEGIN {
23
BEGIN {
27
    require Exporter;
24
    our @EXPORT_OK = qw(
28
    @ISA       = qw(Exporter);
29
    @EXPORT_OK = qw(
30
        GetSplitRoutineNames
25
        GetSplitRoutineNames
31
    );
26
    );
32
}
27
}
33
28
29
use Class::Factory::Util;
30
34
=head1 NAME
31
=head1 NAME
35
32
36
C4::ClassSplitRoutine - base object for creation of classification splitting routines
33
C4::ClassSplitRoutine - base object for creation of classification splitting routines
(-)a/C4/CourseReserves.pm (-15 / +12 lines)
Lines 16-39 package C4::CourseReserves; 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
19
use base 'Exporter';
20
use List::MoreUtils qw( any );
21
22
use C4::Context;
23
24
use Koha::Courses;
25
use Koha::Course::Instructors;
26
use Koha::Course::Items;
27
use Koha::Course::Reserves;
28
use Koha::Checkouts;
29
30
use vars qw(@FIELDS);
20
use vars qw(@FIELDS);
31
our ( @ISA, @EXPORT_OK );
32
21
33
BEGIN {
22
BEGIN {
34
    require Exporter;
23
    our @EXPORT_OK = qw(
35
    @ISA       = qw(Exporter);
36
    @EXPORT_OK = qw(
37
        GetCourse
24
        GetCourse
38
        ModCourse
25
        ModCourse
39
        GetCourses
26
        GetCourses
Lines 58-63 BEGIN { Link Here
58
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
45
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
59
}
46
}
60
47
48
use List::MoreUtils qw( any );
49
50
use C4::Context;
51
52
use Koha::Courses;
53
use Koha::Course::Instructors;
54
use Koha::Course::Items;
55
use Koha::Course::Reserves;
56
use Koha::Checkouts;
57
61
=head1 NAME
58
=head1 NAME
62
59
63
C4::CourseReserves - Koha course reserves module
60
C4::CourseReserves - Koha course reserves module
(-)a/C4/External/BakerTaylor.pm (-7 / +8 lines)
Lines 18-38 package C4::External::BakerTaylor; 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
20
21
use Modern::Perl;
22
use base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
26
}
27
21
use XML::Simple;
28
use XML::Simple;
22
use LWP::Simple qw( get );
29
use LWP::Simple qw( get );
23
30
24
use C4::Context;
31
use C4::Context;
25
32
26
use Modern::Perl;
27
28
use vars qw(%EXPORT_TAGS $VERSION);
33
use vars qw(%EXPORT_TAGS $VERSION);
29
our ( @ISA, @EXPORT_OK );
30
34
31
BEGIN {
35
BEGIN {
32
    require Exporter;
36
    $VERSION = 3.07.00.049;
33
    @ISA       = qw(Exporter);
34
    $VERSION   = 3.07.00.049;
35
    @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
36
}
37
}
37
38
38
# These variables are plack safe: they are initialized each time
39
# These variables are plack safe: they are initialized each time
(-)a/C4/Heading.pm (+7 lines)
Lines 18-23 package C4::Heading; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        new_from_field
26
    );
27
}
21
28
22
use MARC::Field;
29
use MARC::Field;
23
use C4::Context;
30
use C4::Context;
(-)a/C4/HoldsQueue.pm (-19 / +15 lines)
Lines 19-26 package C4::HoldsQueue; Link Here
19
19
20
# FIXME: expand perldoc, explain intended logic
20
# FIXME: expand perldoc, explain intended logic
21
21
22
use strict;
22
use Modern::Perl;
23
use warnings;
23
use base 'Exporter';
24
25
BEGIN {
26
    our @EXPORT_OK = qw(
27
        CreateQueue
28
        GetHoldsQueueItems
29
30
        TransportCostMatrix
31
        UpdateTransportCostMatrix
32
        GetPendingHoldRequestsForBib
33
        load_branches_to_pull_from
34
        update_queue_for_biblio
35
    );
36
}
24
37
25
use C4::Context;
38
use C4::Context;
26
use C4::Circulation qw( GetBranchItemRule );
39
use C4::Circulation qw( GetBranchItemRule );
Lines 36-58 use List::Util qw( shuffle ); Link Here
36
use List::MoreUtils    qw( any );
49
use List::MoreUtils    qw( any );
37
use Algorithm::Munkres qw();
50
use Algorithm::Munkres qw();
38
51
39
our ( @ISA, @EXPORT_OK );
40
41
BEGIN {
42
    require Exporter;
43
    @ISA       = qw(Exporter);
44
    @EXPORT_OK = qw(
45
        CreateQueue
46
        GetHoldsQueueItems
47
48
        TransportCostMatrix
49
        UpdateTransportCostMatrix
50
        GetPendingHoldRequestsForBib
51
        load_branches_to_pull_from
52
        update_queue_for_biblio
53
    );
54
}
55
56
=head1 FUNCTIONS
52
=head1 FUNCTIONS
57
53
58
=head2 TransportCostMatrix
54
=head2 TransportCostMatrix
(-)a/C4/ImportBatch.pm (-29 / +25 lines)
Lines 17-53 package C4::ImportBatch; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
23
use C4::Context;
24
use C4::Koha   qw( GetNormalizedISBN );
25
use C4::Biblio qw(
26
    AddBiblio
27
    DelBiblio
28
    GetMarcFromKohaField
29
    GetXmlBiblio
30
    ModBiblio
31
    TransformMarcToKoha
32
);
33
use C4::Items   qw( AddItemFromMarc ModItemFromMarc );
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
35
use C4::AuthoritiesMarc
36
    qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
37
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
38
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
39
use Koha::Items;
40
use Koha::SearchEngine;
41
use Koha::SearchEngine::Indexer;
42
use Koha::Plugins::Handler;
43
use Koha::Logger;
44
45
our ( @ISA, @EXPORT_OK );
46
22
47
BEGIN {
23
BEGIN {
48
    require Exporter;
24
    our @EXPORT_OK = qw(
49
    @ISA       = qw(Exporter);
50
    @EXPORT_OK = qw(
51
        GetZ3950BatchId
25
        GetZ3950BatchId
52
        GetWebserviceBatchId
26
        GetWebserviceBatchId
53
        GetImportRecordMarc
27
        GetImportRecordMarc
Lines 97-102 BEGIN { Link Here
97
    );
71
    );
98
}
72
}
99
73
74
use C4::Context;
75
use C4::Koha   qw( GetNormalizedISBN );
76
use C4::Biblio qw(
77
    AddBiblio
78
    DelBiblio
79
    GetMarcFromKohaField
80
    GetXmlBiblio
81
    ModBiblio
82
    TransformMarcToKoha
83
);
84
use C4::Items   qw( AddItemFromMarc ModItemFromMarc );
85
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
86
use C4::AuthoritiesMarc
87
    qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
88
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
89
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
90
use Koha::Items;
91
use Koha::SearchEngine;
92
use Koha::SearchEngine::Indexer;
93
use Koha::Plugins::Handler;
94
use Koha::Logger;
95
100
=head1 NAME
96
=head1 NAME
101
97
102
C4::ImportBatch - manage batches of imported MARC records
98
C4::ImportBatch - manage batches of imported MARC records
(-)a/C4/ImportExportFramework.pm (-14 / +11 lines)
Lines 17-24 package C4::ImportExportFramework; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        ExportFramework
26
        ImportFramework
27
        createODS
28
    );
29
}
30
22
use XML::LibXML;
31
use XML::LibXML;
23
use XML::LibXML::XPathContext;
32
use XML::LibXML::XPathContext;
24
use Digest::MD5;
33
use Digest::MD5;
Lines 29-46 use List::MoreUtils qw( indexes ); Link Here
29
use C4::Context;
38
use C4::Context;
30
use Koha::Logger;
39
use Koha::Logger;
31
40
32
our ( @ISA, @EXPORT_OK );
33
34
BEGIN {
35
    require Exporter;
36
    @ISA       = qw(Exporter);
37
    @EXPORT_OK = qw(
38
        ExportFramework
39
        ImportFramework
40
        createODS
41
    );
42
}
43
44
use constant XMLSTR => '<?xml version="1.0" encoding="UTF-8"?>
41
use constant XMLSTR => '<?xml version="1.0" encoding="UTF-8"?>
45
<?mso-application progid="Excel.Sheet"?>
42
<?mso-application progid="Excel.Sheet"?>
46
<Workbook
43
<Workbook
(-)a/C4/InstallAuth.pm (-12 / +9 lines)
Lines 18-44 package C4::InstallAuth; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        checkauth
26
        get_template_and_user
27
    );
28
}
29
21
use CGI::Session;
30
use CGI::Session;
22
use File::Spec;
31
use File::Spec;
23
32
24
require Exporter;
25
26
use C4::Context;
33
use C4::Context;
27
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
28
use C4::Templates;
35
use C4::Templates;
29
36
30
use Koha::Session;
37
use Koha::Session;
31
38
32
our ( @ISA, @EXPORT_OK );
33
34
BEGIN {
35
    @ISA       = qw(Exporter);
36
    @EXPORT_OK = qw(
37
        checkauth
38
        get_template_and_user
39
    );
40
}
41
42
=head1 NAME
39
=head1 NAME
43
40
44
InstallAuth - Authenticates Koha users for Install process
41
InstallAuth - Authenticates Koha users for Install process
(-)a/C4/Items.pm (-6 / +2 lines)
Lines 19-32 package C4::Items; 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
22
use base 'Exporter';
23
our ( @ISA, @EXPORT_OK );
24
23
25
BEGIN {
24
BEGIN {
26
    require Exporter;
25
    our @EXPORT_OK = qw(
27
    @ISA = qw(Exporter);
28
29
    @EXPORT_OK = qw(
30
        AddItemFromMarc
26
        AddItemFromMarc
31
        AddItemBatchFromMarc
27
        AddItemBatchFromMarc
32
        ModItemFromMarc
28
        ModItemFromMarc
(-)a/C4/Koha.pm (-13 / +10 lines)
Lines 20-40 package C4::Koha; 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
23
use base 'Exporter';
24
use C4::Context;
25
use Koha::Caches;
26
use Koha::AuthorisedValues;
27
use Koha::Libraries;
28
use Koha::MarcSubfieldStructures;
29
use Business::ISBN;
30
use Business::ISSN;
31
32
our ( @ISA, @EXPORT_OK );
33
24
34
BEGIN {
25
BEGIN {
35
    require Exporter;
26
    our @EXPORT_OK = qw(
36
    @ISA       = qw(Exporter);
37
    @EXPORT_OK = qw(
38
        GetItemTypesCategorized
27
        GetItemTypesCategorized
39
        getallthemes
28
        getallthemes
40
        getFacets
29
        getFacets
Lines 60-65 BEGIN { Link Here
60
    );
49
    );
61
}
50
}
62
51
52
use C4::Context;
53
use Koha::Caches;
54
use Koha::AuthorisedValues;
55
use Koha::Libraries;
56
use Koha::MarcSubfieldStructures;
57
use Business::ISBN;
58
use Business::ISSN;
59
63
=head1 NAME
60
=head1 NAME
64
61
65
C4::Koha - Perl Module containing convenience functions for Koha scripts
62
C4::Koha - Perl Module containing convenience functions for Koha scripts
(-)a/C4/Languages.pm (-15 / +11 lines)
Lines 18-40 package C4::Languages; 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
20
21
use strict;
21
use Modern::Perl;
22
use warnings;
22
use base 'Exporter';
23
24
use Carp qw( carp );
25
use CGI;
26
use List::MoreUtils qw( any );
27
use C4::Context;
28
use Koha::Caches;
29
use Koha::Cache::Memory::Lite;
30
use Koha::Language;
31
32
our ( @ISA, @EXPORT_OK );
33
23
34
BEGIN {
24
BEGIN {
35
    require Exporter;
25
    our @EXPORT_OK = qw(
36
    @ISA       = qw(Exporter);
37
    @EXPORT_OK = qw(
38
        getFrameworkLanguages
26
        getFrameworkLanguages
39
        getTranslatedLanguages
27
        getTranslatedLanguages
40
        getLanguages
28
        getLanguages
Lines 44-49 BEGIN { Link Here
44
        qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
32
        qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
45
}
33
}
46
34
35
use Carp qw( carp );
36
use CGI;
37
use List::MoreUtils qw( any );
38
use C4::Context;
39
use Koha::Caches;
40
use Koha::Cache::Memory::Lite;
41
use Koha::Language;
42
47
=head1 NAME
43
=head1 NAME
48
44
49
C4::Languages - Perl Module containing language list functions for Koha 
45
C4::Languages - Perl Module containing language list functions for Koha 
(-)a/C4/Letters.pm (-24 / +21 lines)
Lines 18-23 package C4::Letters; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        GetLetters
26
        GetLettersAvailableForALibrary
27
        GetLetterTemplates
28
        DelLetter
29
        GetPreparedLetter
30
        GetWrappedLetter
31
        SendAlerts
32
        GetPrintMessages
33
        GetQueuedMessages
34
        GetMessage
35
        GetMessageTransportTypes
36
37
        EnqueueLetter
38
        SendQueuedMessages
39
        ResendMessage
40
    );
41
}
21
42
22
use Carp qw( carp croak );
43
use Carp qw( carp croak );
23
use Template;
44
use Template;
Lines 44-73 use Koha::Template::Plugin::KohaDates; Link Here
44
65
45
use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822';
66
use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822';
46
67
47
our ( @ISA, @EXPORT_OK );
48
49
BEGIN {
50
    require Exporter;
51
    @ISA       = qw(Exporter);
52
    @EXPORT_OK = qw(
53
        GetLetters
54
        GetLettersAvailableForALibrary
55
        GetLetterTemplates
56
        DelLetter
57
        GetPreparedLetter
58
        GetWrappedLetter
59
        SendAlerts
60
        GetPrintMessages
61
        GetQueuedMessages
62
        GetMessage
63
        GetMessageTransportTypes
64
65
        EnqueueLetter
66
        SendQueuedMessages
67
        ResendMessage
68
    );
69
}
70
71
our $domain_limits = {};
68
our $domain_limits = {};
72
69
73
=head1 NAME
70
=head1 NAME
(-)a/C4/Members.pm (-12 / +10 lines)
Lines 20-25 package C4::Members; 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 base 'Exporter';
24
25
BEGIN {
26
    our @EXPORT_OK = qw(
27
        GetBorrowersToExpunge
28
29
        IssueSlip
30
    );
31
}
32
23
use C4::Context;
33
use C4::Context;
24
use Scalar::Util qw( looks_like_number );
34
use Scalar::Util qw( looks_like_number );
25
use Date::Calc   qw( check_date Date_to_Days );
35
use Date::Calc   qw( check_date Date_to_Days );
Lines 36-53 use Koha::AdditionalContents; Link Here
36
use Koha::Patrons;
46
use Koha::Patrons;
37
use Koha::Patron::Categories;
47
use Koha::Patron::Categories;
38
48
39
our ( @ISA, @EXPORT_OK );
40
41
BEGIN {
42
    require Exporter;
43
    @ISA       = qw(Exporter);
44
    @EXPORT_OK = qw(
45
        GetBorrowersToExpunge
46
47
        IssueSlip
48
    );
49
}
50
51
=head1 NAME
49
=head1 NAME
52
50
53
C4::Members - Perl Module containing convenience functions for member handling
51
C4::Members - Perl Module containing convenience functions for member handling
(-)a/C4/Members/Messaging.pm (-2 / +13 lines)
Lines 17-24 package C4::Members::Messaging; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
22
use base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(
26
        GetMessagingPreferences
27
        SetMessagingPreference
28
        GetMessagingOptions
29
        SetMessagingPreferencesFromDefaults
30
    );
31
}
32
22
use C4::Context;
33
use C4::Context;
23
34
24
=head1 NAME
35
=head1 NAME
(-)a/C4/Members/Statistics.pm (-8 / +4 lines)
Lines 23-38 C4::Members::Statistics - Get statistics for patron checkouts Link Here
23
=cut
23
=cut
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
26
use base 'Exporter';
27
use C4::Context;
28
29
our ( @ISA, @EXPORT_OK );
30
27
31
BEGIN {
28
BEGIN {
32
    require Exporter;
29
    our @EXPORT_OK = qw(
33
    @ISA = qw(Exporter);
34
35
    @EXPORT_OK = qw(
36
        get_fields
30
        get_fields
37
        GetTotalIssuesTodayByBorrower
31
        GetTotalIssuesTodayByBorrower
38
        GetTotalIssuesReturnedTodayByBorrower
32
        GetTotalIssuesReturnedTodayByBorrower
Lines 40-45 BEGIN { Link Here
40
    );
34
    );
41
}
35
}
42
36
37
use C4::Context;
38
43
=head2 get_fields
39
=head2 get_fields
44
  Get fields form syspref 'StatisticsFields'
40
  Get fields form syspref 'StatisticsFields'
45
  Returns list of valid fields, defaults to 'location|itype|ccode'
41
  Returns list of valid fields, defaults to 'location|itype|ccode'
(-)a/C4/Output.pm (-14 / +10 lines)
Lines 25-46 package C4::Output; Link Here
25
# templates.
25
# templates.
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
28
use base 'Exporter';
29
use HTML::Entities;
30
use Scalar::Util qw( looks_like_number );
31
use URI::Escape;
32
33
use C4::Auth qw( get_template_and_user );
34
use C4::Context;
35
use C4::Templates;
36
37
our ( @ISA, @EXPORT_OK );
38
29
39
BEGIN {
30
BEGIN {
40
    require Exporter;
31
    our @EXPORT_OK = qw(
41
42
    @ISA       = qw(Exporter);
43
    @EXPORT_OK = qw(
44
        is_ajax
32
        is_ajax
45
        ajax_fail
33
        ajax_fail
46
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
34
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
Lines 50-55 BEGIN { Link Here
50
    );
38
    );
51
}
39
}
52
40
41
use HTML::Entities;
42
use Scalar::Util qw( looks_like_number );
43
use URI::Escape;
44
45
use C4::Auth qw( get_template_and_user );
46
use C4::Context;
47
use C4::Templates;
48
53
=head1 NAME
49
=head1 NAME
54
50
55
C4::Output - Functions for managing output, is slowly being deprecated
51
C4::Output - Functions for managing output, is slowly being deprecated
(-)a/C4/Overdues.pm (-22 / +19 lines)
Lines 19-49 package C4::Overdues; 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 Date::Calc                    qw( Today );
22
use base 'Exporter';
23
use Date::Manip                   qw( UnixDate );
24
use List::MoreUtils               qw( uniq );
25
use POSIX                         qw( ceil floor );
26
use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL );
27
use Carp                          qw( carp );
28
29
use C4::Accounts;
30
use C4::Context;
31
use Koha::Account::Lines;
32
use Koha::Account::Offsets;
33
use Koha::DateUtils qw( output_pref );
34
use Koha::Libraries;
35
use Koha::Recalls;
36
use Koha::Logger;
37
use Koha::Patrons;
38
39
our ( @ISA, @EXPORT_OK );
40
23
41
BEGIN {
24
BEGIN {
42
    require Exporter;
43
    @ISA = qw(Exporter);
44
45
    # subs to rename (and maybe merge some...)
25
    # subs to rename (and maybe merge some...)
46
    @EXPORT_OK = qw(
26
    our @EXPORT_OK = qw(
47
        CalcFine
27
        CalcFine
48
        Getoverdues
28
        Getoverdues
49
        checkoverdues
29
        checkoverdues
Lines 58-63 BEGIN { Link Here
58
    );
38
    );
59
}
39
}
60
40
41
use Date::Calc                    qw( Today );
42
use Date::Manip                   qw( UnixDate );
43
use List::MoreUtils               qw( uniq );
44
use POSIX                         qw( ceil floor );
45
use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL );
46
use Carp                          qw( carp );
47
48
use C4::Accounts;
49
use C4::Context;
50
use Koha::Account::Lines;
51
use Koha::Account::Offsets;
52
use Koha::DateUtils qw( output_pref );
53
use Koha::Libraries;
54
use Koha::Recalls;
55
use Koha::Logger;
56
use Koha::Patrons;
57
61
=head1 NAME
58
=head1 NAME
62
59
63
C4::Circulation::Fines - Koha module dealing with fines
60
C4::Circulation::Fines - Koha module dealing with fines
(-)a/C4/Reports.pm (-8 / +6 lines)
Lines 18-37 package C4::Reports; 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 base 'Exporter';
22
23
use C4::Context;
24
25
our ( @ISA, @EXPORT_OK );
26
22
27
BEGIN {
23
BEGIN {
28
    require Exporter;
24
    our @EXPORT_OK = qw(
29
    @ISA       = qw(Exporter);
30
    @EXPORT_OK = qw(
31
        GetDelimiterChoices
25
        GetDelimiterChoices
32
    );
26
    );
33
}
27
}
34
28
29
use CGI qw ( -utf8 );
30
31
use C4::Context;
32
35
=head1 NAME
33
=head1 NAME
36
34
37
C4::Reports - Module for generating reports 
35
C4::Reports - Module for generating reports 
(-)a/C4/Reports/Guided.pm (-22 / +19 lines)
Lines 18-23 package C4::Reports::Guided; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
26
        save_report get_saved_reports execute_query
27
        get_column_type get_distinct_values save_dictionary get_from_dictionary
28
        delete_definition delete_report store_results format_results get_sql get_results
29
        nb_rows update_sql
30
        strip_limit
31
        convert_sql
32
        GetReservedAuthorisedValues
33
        GetParametersFromSQL
34
        IsAuthorisedValueValid
35
        ValidateSQLParameters
36
        nb_rows update_sql
37
        EmailReport
38
    );
39
}
21
40
22
use CGI  qw ( -utf8 );
41
use CGI  qw ( -utf8 );
23
use Carp qw( carp croak );
42
use Carp qw( carp croak );
Lines 39-66 use Koha::Reports; Link Here
39
use Koha::SharedContent;
58
use Koha::SharedContent;
40
use Koha::TemplateUtils qw( process_tt );
59
use Koha::TemplateUtils qw( process_tt );
41
60
42
our ( @ISA, @EXPORT_OK );
43
44
BEGIN {
45
    require Exporter;
46
    @ISA       = qw(Exporter);
47
    @EXPORT_OK = qw(
48
        get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
49
        save_report get_saved_reports execute_query
50
        get_column_type get_distinct_values save_dictionary get_from_dictionary
51
        delete_definition delete_report store_results format_results get_sql get_results
52
        nb_rows update_sql
53
        strip_limit
54
        convert_sql
55
        GetReservedAuthorisedValues
56
        GetParametersFromSQL
57
        IsAuthorisedValueValid
58
        ValidateSQLParameters
59
        nb_rows update_sql
60
        EmailReport
61
    );
62
}
63
64
=head1 NAME
61
=head1 NAME
65
62
66
C4::Reports::Guided - Module for generating guided reports 
63
C4::Reports::Guided - Module for generating guided reports 
(-)a/C4/Reserves.pm (-44 / +41 lines)
Lines 21-26 package C4::Reserves; 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 base 'Exporter';
25
26
BEGIN {
27
    our @EXPORT_OK = qw(
28
        AddReserve
29
30
        GetReserveStatus
31
32
        ChargeReserveFee
33
        GetReserveFee
34
35
        ModReserveAffect
36
        ModReserve
37
        ModReserveStatus
38
        ModReserveCancelAll
39
        ModReserveMinusPriority
40
        MoveReserve
41
42
        CheckReserves
43
        CanBookBeReserved
44
        CanItemBeReserved
45
        CancelExpiredReserves
46
47
        AutoUnsuspendReserves
48
49
        IsAvailableForItemLevelRequest
50
        ItemsAnyAvailableAndNotRestricted
51
52
        AlterPriority
53
        ToggleLowestPriority
54
55
        ReserveSlip
56
        SuspendAll
57
58
        CalculatePriority
59
60
        GetMaxPatronHoldsForRecord
61
62
        MergeHolds
63
    );
64
}
24
65
25
use JSON qw( to_json );
66
use JSON qw( to_json );
26
67
Lines 99-148 This modules provides some functions to deal with reservations. Link Here
99
140
100
=cut
141
=cut
101
142
102
our ( @ISA, @EXPORT_OK );
103
104
BEGIN {
105
    require Exporter;
106
    @ISA       = qw(Exporter);
107
    @EXPORT_OK = qw(
108
        AddReserve
109
110
        GetReserveStatus
111
112
        ChargeReserveFee
113
        GetReserveFee
114
115
        ModReserveAffect
116
        ModReserve
117
        ModReserveStatus
118
        ModReserveCancelAll
119
        ModReserveMinusPriority
120
        MoveReserve
121
122
        CheckReserves
123
        CanBookBeReserved
124
        CanItemBeReserved
125
        CancelExpiredReserves
126
127
        AutoUnsuspendReserves
128
129
        IsAvailableForItemLevelRequest
130
        ItemsAnyAvailableAndNotRestricted
131
132
        AlterPriority
133
        ToggleLowestPriority
134
135
        ReserveSlip
136
        SuspendAll
137
138
        CalculatePriority
139
140
        GetMaxPatronHoldsForRecord
141
142
        MergeHolds
143
    );
144
}
145
146
=head2 AddReserve
143
=head2 AddReserve
147
144
148
    AddReserve(
145
    AddReserve(
(-)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
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/Checksum.pm (-5 / +5 lines)
Lines 1-11 Link Here
1
package C4::SIP::Sip::Checksum;
1
package C4::SIP::Sip::Checksum;
2
2
3
use Exporter;
3
use Modern::Perl;
4
use strict;
4
use base 'Exporter';
5
use warnings;
6
5
7
our @ISA       = qw(Exporter);
6
BEGIN {
8
our @EXPORT_OK = qw(checksum verify_cksum);
7
    our @EXPORT_OK = qw(checksum verify_cksum);
8
}
9
9
10
sub checksum {
10
sub checksum {
11
    my $pkt = shift;
11
    my $pkt = shift;
(-)a/C4/Scheduler.pm (-8 / +5 lines)
Lines 18-35 package C4::Scheduler; 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
21
use base 'Exporter';
22
use C4::Context;
23
use Schedule::At;
24
25
our ( @ISA, @EXPORT_OK );
26
22
27
BEGIN {
23
BEGIN {
28
    require Exporter;
24
    our @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
29
    @ISA       = qw(Exporter);
30
    @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
31
}
25
}
32
26
27
use C4::Context;
28
use Schedule::At;
29
33
=head1 NAME
30
=head1 NAME
34
31
35
C4::Scheduler - Module for running jobs with the unix at command
32
C4::Scheduler - Module for running jobs with the unix at command
(-)a/C4/Search.pm (-19 / +17 lines)
Lines 16-21 package C4::Search; 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 base 'Exporter';
20
21
BEGIN {
22
    our @EXPORT_OK = qw(
23
        FindDuplicate
24
        SimpleSearch
25
        searchResults
26
        getRecords
27
        buildQuery
28
        GetDistinctValues
29
        enabled_staff_search_views
30
        new_record_from_zebra
31
        z3950_search_args
32
        getIndexes
33
    );
34
}
35
19
use C4::Context;
36
use C4::Context;
20
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
37
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
21
use C4::Koha
38
use C4::Koha
Lines 43-67 use MARC::Field; Link Here
43
use POSIX qw(setlocale LC_COLLATE);
60
use POSIX qw(setlocale LC_COLLATE);
44
use Unicode::Collate::Locale;
61
use Unicode::Collate::Locale;
45
62
46
our ( @ISA, @EXPORT_OK );
47
48
BEGIN {
49
    require Exporter;
50
    @ISA       = qw(Exporter);
51
    @EXPORT_OK = qw(
52
        FindDuplicate
53
        SimpleSearch
54
        searchResults
55
        getRecords
56
        buildQuery
57
        GetDistinctValues
58
        enabled_staff_search_views
59
        new_record_from_zebra
60
        z3950_search_args
61
        getIndexes
62
    );
63
}
64
65
=head1 NAME
63
=head1 NAME
66
64
67
C4::Search - Functions for searching the Koha catalog.
65
C4::Search - Functions for searching the Koha catalog.
(-)a/C4/Serials.pm (-38 / +35 lines)
Lines 19-24 package C4::Serials; 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 base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(
26
        NewSubscription    ModSubscription    DelSubscription
27
        GetSubscription    CountSubscriptionFromBiblionumber      GetSubscriptionsFromBiblionumber
28
        SearchSubscriptions
29
        GetFullSubscriptionsFromBiblionumber   GetFullSubscription ModSubscriptionHistory
30
        HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
31
        GetFictiveIssueNumber
32
        GetSubscriptionHistoryFromSubscriptionId
33
34
        GetNextSeq GetSeq NewIssue           GetSerials
35
        GetLatestSerials   ModSerialStatus    GetNextDate
36
        CloseSubscription ReopenSubscription
37
        subscriptionCurrentlyOnOrder
38
        can_claim_subscription can_edit_subscription can_show_subscription
39
        GetSerials2
40
        GetSubscriptionLength ReNewSubscription  GetLateOrMissingIssues
41
        GetSerialInformation                   AddItem2Serial
42
        PrepareSerialsData GetNextExpected    ModNextExpected
43
        GetSubscriptionIrregularities
44
        GetPreviousSerialid
45
46
        GetSuppliersWithLateIssues
47
        getroutinglist     delroutingmember   addroutingmember
48
        reorder_members
49
        check_routing updateClaim
50
        CountIssues
51
        HasItems
52
53
        findSerialsByStatus
54
55
    );
56
}
22
57
23
use Carp       qw( croak );
58
use Carp       qw( croak );
24
use Date::Calc qw(
59
use Date::Calc qw(
Lines 73-116 use constant MISSING_STATUSES => ( Link Here
73
    MISSING_LOST
108
    MISSING_LOST
74
);
109
);
75
110
76
our ( @ISA, @EXPORT_OK );
77
78
BEGIN {
79
    require Exporter;
80
    @ISA       = qw(Exporter);
81
    @EXPORT_OK = qw(
82
        NewSubscription    ModSubscription    DelSubscription
83
        GetSubscription    CountSubscriptionFromBiblionumber      GetSubscriptionsFromBiblionumber
84
        SearchSubscriptions
85
        GetFullSubscriptionsFromBiblionumber   GetFullSubscription ModSubscriptionHistory
86
        HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
87
        GetFictiveIssueNumber
88
        GetSubscriptionHistoryFromSubscriptionId
89
90
        GetNextSeq GetSeq NewIssue           GetSerials
91
        GetLatestSerials   ModSerialStatus    GetNextDate
92
        CloseSubscription ReopenSubscription
93
        subscriptionCurrentlyOnOrder
94
        can_claim_subscription can_edit_subscription can_show_subscription
95
        GetSerials2
96
        GetSubscriptionLength ReNewSubscription  GetLateOrMissingIssues
97
        GetSerialInformation                   AddItem2Serial
98
        PrepareSerialsData GetNextExpected    ModNextExpected
99
        GetSubscriptionIrregularities
100
        GetPreviousSerialid
101
102
        GetSuppliersWithLateIssues
103
        getroutinglist     delroutingmember   addroutingmember
104
        reorder_members
105
        check_routing updateClaim
106
        CountIssues
107
        HasItems
108
109
        findSerialsByStatus
110
111
    );
112
}
113
114
=head1 NAME
111
=head1 NAME
115
112
116
C4::Serials - Serials Module Functions
113
C4::Serials - Serials Module Functions
(-)a/C4/ShelfBrowser.pm (-12 / +8 lines)
Lines 17-24 package C4::ShelfBrowser; 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 strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        GetNearbyItems
26
    );
27
}
22
28
23
use C4::Biblio qw( GetAuthorisedValueDesc );
29
use C4::Biblio qw( GetAuthorisedValueDesc );
24
use C4::Context;
30
use C4::Context;
Lines 26-41 use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetN Link Here
26
use Koha::Biblios;
32
use Koha::Biblios;
27
use Koha::Libraries;
33
use Koha::Libraries;
28
34
29
our ( @ISA, @EXPORT_OK );
30
31
BEGIN {
32
    require Exporter;
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
        GetNearbyItems
36
    );
37
}
38
39
=head1 NAME
35
=head1 NAME
40
36
41
C4::ShelfBrowser - functions that deal with the shelf browser feature found in
37
C4::ShelfBrowser - functions that deal with the shelf browser feature found in
(-)a/C4/Stats.pm (-7 / +4 lines)
Lines 18-36 package C4::Stats; 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
21
use base 'Exporter';
22
use Koha::Statistics;
23
24
our ( @ISA, @EXPORT_OK );
25
22
26
BEGIN {
23
BEGIN {
27
    require Exporter;
24
    our @EXPORT_OK = qw(
28
    @ISA       = qw(Exporter);
29
    @EXPORT_OK = qw(
30
        UpdateStats
25
        UpdateStats
31
    );
26
    );
32
}
27
}
33
28
29
use Koha::Statistics;
30
34
=head1 NAME
31
=head1 NAME
35
32
36
C4::Stats - Update Koha statistics (log)
33
C4::Stats - Update Koha statistics (log)
(-)a/C4/Suggestions.pm (-17 / +19 lines)
Lines 19-24 package C4::Suggestions; 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 base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT = qw(
26
        ConnectSuggestionAndBiblio
27
        DelSuggestion
28
        GetSuggestion
29
        GetSuggestionByStatus
30
        GetSuggestionFromBiblionumber
31
        GetSuggestionInfoFromBiblionumber
32
        GetSuggestionInfo
33
        ModStatus
34
        ModSuggestion
35
        DelSuggestionsOlderThan
36
        GetUnprocessedSuggestions
37
        MarcRecordFromNewSuggestion
38
    );
39
}
40
22
use CGI qw ( -utf8 );
41
use CGI qw ( -utf8 );
23
42
24
use C4::Context;
43
use C4::Context;
Lines 29-51 use Koha::DateUtils qw( dt_from_string ); Link Here
29
use Koha::Suggestions;
48
use Koha::Suggestions;
30
use C4::Log qw(logaction);
49
use C4::Log qw(logaction);
31
50
32
use base qw(Exporter);
33
34
our @EXPORT = qw(
35
    ConnectSuggestionAndBiblio
36
    DelSuggestion
37
    GetSuggestion
38
    GetSuggestionByStatus
39
    GetSuggestionFromBiblionumber
40
    GetSuggestionInfoFromBiblionumber
41
    GetSuggestionInfo
42
    ModStatus
43
    ModSuggestion
44
    DelSuggestionsOlderThan
45
    GetUnprocessedSuggestions
46
    MarcRecordFromNewSuggestion
47
);
48
49
=head1 NAME
51
=head1 NAME
50
52
51
C4::Suggestions - Some useful functions for dealings with aqorders.
53
C4::Suggestions - Some useful functions for dealings with aqorders.
(-)a/C4/Tags.pm (-15 / +12 lines)
Lines 18-41 package C4::Tags; 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
20
21
use strict;
21
use Modern::Perl;
22
use warnings;
22
use base 'Exporter';
23
use Carp qw( carp );
24
use Exporter;
25
26
use C4::Context;
23
use C4::Context;
27
use Module::Load::Conditional qw( check_install );
28
use Koha::Tags;
29
use Koha::Tags::Approvals;
30
use Koha::Tags::Indexes;
31
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
32
use constant TAG_SELECT => "SELECT " . join( ',', TAG_FIELDS ) . "\n FROM   tags_all\n";
33
34
our ( @ISA, @EXPORT_OK );
35
24
36
BEGIN {
25
BEGIN {
37
    @ISA       = qw(Exporter);
26
    our @EXPORT_OK = qw(
38
    @EXPORT_OK = qw(
39
        get_tags get_tag_rows
27
        get_tags get_tag_rows
40
        add_tags
28
        add_tags
41
        add_tag
29
        add_tag
Lines 64-69 BEGIN { Link Here
64
    }
52
    }
65
}
53
}
66
54
55
use Carp qw( carp );
56
57
use Module::Load::Conditional qw( check_install );
58
use Koha::Tags;
59
use Koha::Tags::Approvals;
60
use Koha::Tags::Indexes;
61
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
62
use constant TAG_SELECT => "SELECT " . join( ',', TAG_FIELDS ) . "\n FROM   tags_all\n";
63
67
=head1 C4::Tags.pm - Support for user tagging of biblios.
64
=head1 C4::Tags.pm - Support for user tagging of biblios.
68
65
69
=cut
66
=cut
(-)a/C4/TmplTokenType.pm (-7 / +2 lines)
Lines 18-24 package C4::TmplTokenType; 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
require Exporter;
21
use base 'Exporter';
22
22
23
###############################################################################
23
###############################################################################
24
24
Lines 40-52 The predefined constants are Link Here
40
use vars qw( $_text $_text_parametrized $_cdata
40
use vars qw( $_text $_text_parametrized $_cdata
41
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
41
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
42
42
43
our ( @ISA, @EXPORT_OK );
44
45
BEGIN {
43
BEGIN {
46
44
    our @EXPORT_OK = qw(
47
    require Exporter;
48
    @ISA       = qw(Exporter);
49
    @EXPORT_OK = qw(
50
        TEXT
45
        TEXT
51
        TEXT_PARAMETRIZED
46
        TEXT_PARAMETRIZED
52
        CDATA
47
        CDATA
(-)a/C4/XISBN.pm (-10 / +8 lines)
Lines 19-24 package C4::XISBN; 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 base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(
26
        get_xisbns
27
    );
28
}
29
22
use XML::Simple;
30
use XML::Simple;
23
31
24
use C4::Biblio              qw(TransformMarcToKoha);
32
use C4::Biblio              qw(TransformMarcToKoha);
Lines 31-46 use Koha::Biblios; Link Here
31
use Koha::SearchEngine;
39
use Koha::SearchEngine;
32
use Koha::SearchEngine::Search;
40
use Koha::SearchEngine::Search;
33
41
34
our ( @ISA, @EXPORT_OK );
35
36
BEGIN {
37
    require Exporter;
38
    @ISA       = qw(Exporter);
39
    @EXPORT_OK = qw(
40
        get_xisbns
41
    );
42
}
43
44
=head1 NAME
42
=head1 NAME
45
43
46
C4::XISBN - Functions for retrieving XISBN content in Koha
44
C4::XISBN - Functions for retrieving XISBN content in Koha
(-)a/C4/XSLT.pm (-15 / +11 lines)
Lines 22-27 package C4::XSLT; 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 base 'Exporter';
26
use Koha::XSLT::Base;
27
my $engine;    #XSLT Handler object
28
29
BEGIN {
30
    our @EXPORT_OK = qw(
31
        buildKohaItemsNamespace
32
        XSLTParse4Display
33
    );
34
    $engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
35
}
25
36
26
use C4::Context;
37
use C4::Context;
27
use C4::Koha   qw( xml_escape );
38
use C4::Koha   qw( xml_escape );
Lines 29-35 use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure ); Link Here
29
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
30
use Koha::ItemTypes;
41
use Koha::ItemTypes;
31
use Koha::RecordProcessor;
42
use Koha::RecordProcessor;
32
use Koha::XSLT::Base;
33
use Koha::Libraries;
43
use Koha::Libraries;
34
use Koha::Recalls;
44
use Koha::Recalls;
35
use Koha::TemplateUtils qw( process_tt );
45
use Koha::TemplateUtils qw( process_tt );
Lines 37-56 use Koha::AdditionalContents; Link Here
37
use C4::Scrubber;
47
use C4::Scrubber;
38
use C4::Languages;
48
use C4::Languages;
39
49
40
my $engine;    #XSLT Handler object
41
42
our ( @ISA, @EXPORT_OK );
43
44
BEGIN {
45
    require Exporter;
46
    @ISA       = qw(Exporter);
47
    @EXPORT_OK = qw(
48
        buildKohaItemsNamespace
49
        XSLTParse4Display
50
    );
51
    $engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
52
}
53
54
=head1 NAME
50
=head1 NAME
55
51
56
C4::XSLT - Functions for displaying XSLT-generated content
52
C4::XSLT - Functions for displaying XSLT-generated content
(-)a/Koha/AuthUtils.pm (-8 / +6 lines)
Lines 18-23 package Koha::AuthUtils; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
25
}
26
21
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
27
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
22
use Encode;
28
use Encode;
23
use Fcntl           qw( O_RDONLY );        # O_RDONLY is used in generate_salt
29
use Fcntl           qw( O_RDONLY );        # O_RDONLY is used in generate_salt
Lines 27-40 use Koha::Exceptions::Password; Link Here
27
33
28
use C4::Context;
34
use C4::Context;
29
35
30
our ( @ISA, @EXPORT_OK );
31
32
BEGIN {
33
    require Exporter;
34
    @ISA       = qw(Exporter);
35
    @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
36
}
37
38
=head1 NAME
36
=head1 NAME
39
37
40
Koha::AuthUtils - utility routines for authentication
38
Koha::AuthUtils - utility routines for authentication
(-)a/Koha/DateUtils.pm (-10 / +7 lines)
Lines 17-34 package Koha::DateUtils; 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 DateTime;
20
use base 'Exporter';
21
use C4::Context;
22
use Koha::Exceptions;
23
use Koha::DateTime::Format::RFC3339;
24
25
use vars qw(@ISA @EXPORT_OK);
26
21
27
BEGIN {
22
BEGIN {
28
    require Exporter;
23
    our @EXPORT_OK = qw(
29
    @ISA = qw(Exporter);
30
31
    @EXPORT_OK = qw(
32
        dt_from_string
24
        dt_from_string
33
        output_pref
25
        output_pref
34
        format_sqldatetime
26
        format_sqldatetime
Lines 36-41 BEGIN { Link Here
36
    );
28
    );
37
}
29
}
38
30
31
use DateTime;
32
use C4::Context;
33
use Koha::Exceptions;
34
use Koha::DateTime::Format::RFC3339;
35
39
=head1 DateUtils
36
=head1 DateUtils
40
37
41
Koha::DateUtils - Transitional wrappers to ease use of DateTime
38
Koha::DateUtils - Transitional wrappers to ease use of DateTime
(-)a/Koha/EDI.pm (-16 / +12 lines)
Lines 17-25 package Koha::EDI; 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 strict;
20
use Modern::Perl;
21
use warnings;
22
use base qw(Exporter);
21
use base qw(Exporter);
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        process_quote
26
        process_invoice
27
        process_ordrsp
28
        create_edi_order
29
        get_edifact_ean
30
    );
31
}
32
23
use utf8;
33
use utf8;
24
use English qw{ -no_match_vars };
34
use English qw{ -no_match_vars };
25
use Business::ISBN;
35
use Business::ISBN;
Lines 48-67 use Koha::Util::FrameworkPlugin qw( biblio_008 ); Link Here
48
58
49
our $VERSION = 1.1;
59
our $VERSION = 1.1;
50
60
51
our ( @ISA, @EXPORT_OK );
52
53
BEGIN {
54
    require Exporter;
55
    @ISA       = qw(Exporter);
56
    @EXPORT_OK = qw(
57
        process_quote
58
        process_invoice
59
        process_ordrsp
60
        create_edi_order
61
        get_edifact_ean
62
    );
63
}
64
65
sub create_edi_order {
61
sub create_edi_order {
66
    my $parameters = shift;
62
    my $parameters = shift;
67
    my $basketno   = $parameters->{basketno};
63
    my $basketno   = $parameters->{basketno};
(-)a/Koha/I18N.pm (-19 / +18 lines)
Lines 18-42 package Koha::I18N; 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
21
use base 'Exporter';
22
use C4::Languages;
23
use C4::Context;
24
25
use Encode;
26
use List::Util       qw( first );
27
use Locale::Messages qw(
28
    bindtextdomain
29
    gettext
30
    LC_MESSAGES
31
    ngettext
32
    npgettext
33
    pgettext
34
    textdomain
35
);
36
use POSIX qw();
37
use Koha::Cache::Memory::Lite;
38
39
use parent 'Exporter';
40
our @EXPORT = qw(
22
our @EXPORT = qw(
41
    __
23
    __
42
    __x
24
    __x
Lines 57-62 our @EXPORT_OK = qw( Link Here
57
    available_locales
39
    available_locales
58
);
40
);
59
41
42
use C4::Languages;
43
use C4::Context;
44
45
use Encode;
46
use List::Util       qw( first );
47
use Locale::Messages qw(
48
    bindtextdomain
49
    gettext
50
    LC_MESSAGES
51
    ngettext
52
    npgettext
53
    pgettext
54
    textdomain
55
);
56
use POSIX qw();
57
use Koha::Cache::Memory::Lite;
58
60
our $textdomain = 'Koha';
59
our $textdomain = 'Koha';
61
60
62
=head1 NAME
61
=head1 NAME
(-)a/Koha/Item/Search/Field.pm (-5 / +2 lines)
Lines 1-13 Link Here
1
package Koha::Item::Search::Field;
1
package Koha::Item::Search::Field;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
use base 'Exporter';
5
our ( @ISA, @EXPORT_OK );
6
5
7
BEGIN {
6
BEGIN {
8
    require Exporter;
7
    our @EXPORT_OK = qw(
9
    @ISA       = qw(Exporter);
10
    @EXPORT_OK = qw(
11
        AddItemSearchField
8
        AddItemSearchField
12
        ModItemSearchField
9
        ModItemSearchField
13
        DelItemSearchField
10
        DelItemSearchField
(-)a/Koha/List/Patron.pm (-9 / +6 lines)
Lines 26-42 Koha::List::Patron - Management of lists of patrons Link Here
26
=cut
26
=cut
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
29
use base 'Exporter';
30
use Carp qw( carp croak );
31
32
use Koha::Database;
33
34
our ( @ISA, @EXPORT_OK );
35
30
36
BEGIN {
31
BEGIN {
37
    require Exporter;
32
    our @EXPORT_OK = qw(
38
    @ISA       = qw(Exporter);
39
    @EXPORT_OK = qw(
40
        GetPatronLists
33
        GetPatronLists
41
34
42
        DelPatronList
35
        DelPatronList
Lines 48-53 BEGIN { Link Here
48
    );
41
    );
49
}
42
}
50
43
44
use Carp qw( carp croak );
45
46
use Koha::Database;
47
51
=head2 GetPatronLists
48
=head2 GetPatronLists
52
49
53
    my @lists = GetPatronLists( $params );
50
    my @lists = GetPatronLists( $params );
(-)a/Koha/Patron/Debarments.pm (-13 / +10 lines)
Lines 18-38 package Koha::Patron::Debarments; 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
21
use base 'Exporter';
22
use C4::Context;
23
use C4::Log qw( logaction );
24
25
use Koha::Database;
26
use Koha::Patrons;
27
use Koha::Patron::Restriction::Types;
28
use Koha::Patron::Restrictions;
29
30
our ( @ISA, @EXPORT_OK );
31
22
32
BEGIN {
23
BEGIN {
33
    require Exporter;
24
    our @EXPORT_OK = qw(
34
    @ISA       = qw(Exporter);
35
    @EXPORT_OK = qw(
36
        AddDebarment
25
        AddDebarment
37
        DelDebarment
26
        DelDebarment
38
        ModDebarment
27
        ModDebarment
Lines 43-48 BEGIN { Link Here
43
    );
32
    );
44
}
33
}
45
34
35
use C4::Context;
36
use C4::Log qw( logaction );
37
38
use Koha::Database;
39
use Koha::Patrons;
40
use Koha::Patron::Restriction::Types;
41
use Koha::Patron::Restrictions;
42
46
=head1 Koha::Patron::Debarments
43
=head1 Koha::Patron::Debarments
47
44
48
Koha::Patron::Debarments - Module for managing patron debarments
45
Koha::Patron::Debarments - Module for managing patron debarments
(-)a/Koha/Patron/Password/Recovery.pm (-14 / +12 lines)
Lines 18-23 package Koha::Patron::Password::Recovery; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        ValidateBorrowernumber
26
        SendPasswordRecoveryEmail
27
        GetValidLinkInfo
28
        CompletePasswordRecovery
29
        DeleteExpiredPasswordRecovery
30
    );
31
}
32
21
use C4::Context;
33
use C4::Context;
22
use C4::Letters;
34
use C4::Letters;
23
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
35
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
Lines 26-45 use Koha::DateUtils qw( dt_from_string ); Link Here
26
use constant PATRON => 2;
38
use constant PATRON => 2;
27
use constant STAFF  => 5;
39
use constant STAFF  => 5;
28
40
29
our ( @ISA, @EXPORT_OK );
30
31
BEGIN {
32
    require Exporter;
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
        &ValidateBorrowernumber
36
        &SendPasswordRecoveryEmail
37
        &GetValidLinkInfo
38
        &CompletePasswordRecovery
39
        &DeleteExpiredPasswordRecovery
40
    );
41
}
42
43
=head1 NAME
41
=head1 NAME
44
42
45
Koha::Patron::Password::Recovery - Koha password recovery module
43
Koha::Patron::Password::Recovery - Koha password recovery module
(-)a/Koha/SimpleMARC.pm (-8 / +4 lines)
Lines 16-31 package Koha::SimpleMARC; 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
19
use base 'Exporter';
20
use constant LAST_TRANSACTION_FIELD => q/005/;    # MARC21/UNIMARC
21
22
our ( @ISA, @EXPORT_OK );
23
20
24
BEGIN {
21
BEGIN {
25
    require Exporter;
22
    our @EXPORT_OK = qw(
26
    our @ISA = qw(Exporter);
27
28
    @EXPORT_OK = qw(
29
        read_field
23
        read_field
30
        add_field
24
        add_field
31
        update_field
25
        update_field
Lines 39-44 BEGIN { Link Here
39
    );
33
    );
40
}
34
}
41
35
36
use constant LAST_TRANSACTION_FIELD => q/005/;    # MARC21/UNIMARC
37
42
=head1 NAME
38
=head1 NAME
43
39
44
SimpleMARC - Perl module for making simple MARC record alterations.
40
SimpleMARC - Perl module for making simple MARC record alterations.
(-)a/Koha/TemplateUtils.pm (-8 / +5 lines)
Lines 18-23 package Koha::TemplateUtils; 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 base 'Exporter';
22
23
BEGIN {
24
    our @EXPORT_OK = qw( process_tt );
25
}
21
26
22
use Carp qw( croak );
27
use Carp qw( croak );
23
use Try::Tiny;
28
use Try::Tiny;
Lines 25-38 use Template; Link Here
25
30
26
use C4::Context;
31
use C4::Context;
27
32
28
use vars qw(@ISA @EXPORT_OK);
29
30
BEGIN {
31
    require Exporter;
32
    @ISA       = qw(Exporter);
33
    @EXPORT_OK = qw( process_tt );
34
}
35
36
=head1 NAME
33
=head1 NAME
37
34
38
Koha::TemplateUtils
35
Koha::TemplateUtils
(-)a/Koha/Util/FrameworkPlugin.pm (-7 / +4 lines)
Lines 21-37 package Koha::Util::FrameworkPlugin; Link Here
21
#
21
#
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
use base 'Exporter';
25
use constant DEFAULT_008_POS_6_39 => 'b        |||||||| |||| 00| 0 eng d';
26
27
our ( @ISA, @EXPORT_OK );
28
25
29
BEGIN {
26
BEGIN {
30
    require Exporter;
27
    our @EXPORT_OK = qw( wrapper date_entered biblio_008 );
31
    @ISA       = qw( Exporter );
32
    @EXPORT_OK = qw( wrapper date_entered biblio_008 );
33
}
28
}
34
29
30
use constant DEFAULT_008_POS_6_39 => 'b        |||||||| |||| 00| 0 eng d';
31
35
=head1 NAME
32
=head1 NAME
36
33
37
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
34
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
(-)a/Koha/Util/StockRotation.pm (-11 / +7 lines)
Lines 20-37 package Koha::Util::StockRotation; 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
23
use base 'Exporter';
24
use Koha::Items;
25
use Koha::StockRotationItems;
26
use Koha::Database;
27
28
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
29
24
30
BEGIN {
25
BEGIN {
31
    require Exporter;
26
    our @EXPORT_OK = qw(
32
    @ISA       = qw( Exporter );
33
    @EXPORT    = qw( );
34
    @EXPORT_OK = qw(
35
        get_branches
27
        get_branches
36
        get_stages
28
        get_stages
37
        toggle_indemand
29
        toggle_indemand
Lines 40-48 BEGIN { Link Here
40
        add_items_to_rota
32
        add_items_to_rota
41
        move_to_next_stage
33
        move_to_next_stage
42
    );
34
    );
43
    %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
35
    our %EXPORT_TAGS = ( ALL => [@EXPORT_OK] );
44
}
36
}
45
37
38
use Koha::Items;
39
use Koha::StockRotationItems;
40
use Koha::Database;
41
46
=head1 NAME
42
=head1 NAME
47
43
48
Koha::Util::StockRotation - utility class with routines for Stock Rotation
44
Koha::Util::StockRotation - utility class with routines for Stock Rotation
(-)a/Koha/pdfformat/layout1page.pm (-8 / +6 lines)
Lines 18-38 package Koha::pdfformat::layout1page; 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
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
20
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
21
use vars qw(@ISA @EXPORT);
22
use Modern::Perl;
21
use Modern::Perl;
22
use base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT = qw(printpdf);
26
}
27
23
use utf8;
28
use utf8;
24
29
25
use Koha::Number::Price;
30
use Koha::Number::Price;
26
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::DateUtils qw( dt_from_string output_pref );
27
use Koha::Libraries;
32
use Koha::Libraries;
28
33
29
BEGIN {
30
    use Exporter ();
31
    our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
32
    @ISA    = qw(Exporter);
33
    @EXPORT = qw(printpdf);
34
}
35
36
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
34
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
37
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
35
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
38
use constant mm => 25.4 / 72;
36
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout2pages.pm (-8 / +6 lines)
Lines 21-41 package Koha::pdfformat::layout2pages; 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
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use vars qw(@ISA @EXPORT);
25
use Modern::Perl;
24
use Modern::Perl;
25
use base 'Exporter';
26
27
BEGIN {
28
    our @EXPORT = qw(printpdf);
29
}
30
26
use utf8;
31
use utf8;
27
32
28
use Koha::Number::Price;
33
use Koha::Number::Price;
29
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Libraries;
35
use Koha::Libraries;
31
36
32
BEGIN {
33
    use Exporter ();
34
    our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
35
    @ISA    = qw(Exporter);
36
    @EXPORT = qw(printpdf);
37
}
38
39
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
37
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
40
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
38
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
41
use constant mm => 25.4 / 72;
39
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout2pagesde.pm (-8 / +6 lines)
Lines 22-41 package Koha::pdfformat::layout2pagesde; Link Here
22
22
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use Modern::Perl;
24
use Modern::Perl;
25
use base 'Exporter';
26
27
BEGIN {
28
    our @EXPORT_OK = qw(printpdf);
29
}
30
25
use utf8;
31
use utf8;
26
32
27
use Koha::Number::Price;
33
use Koha::Number::Price;
28
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::DateUtils qw( dt_from_string output_pref );
29
use Koha::Libraries;
35
use Koha::Libraries;
30
36
31
our ( @ISA, @EXPORT_OK );
32
33
BEGIN {
34
    require Exporter;
35
    @ISA       = qw(Exporter);
36
    @EXPORT_OK = qw(printpdf);
37
}
38
39
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
37
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
40
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
38
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
41
use constant mm => 25.4 / 72;
39
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout3pages.pm (-8 / +8 lines)
Lines 21-29 package Koha::pdfformat::layout3pages; 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
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use vars            qw(@ISA @EXPORT);
24
25
use List::MoreUtils qw( uniq );
26
use Modern::Perl;
25
use Modern::Perl;
26
use base 'Exporter';
27
28
BEGIN {
29
    our @EXPORT = qw(printpdf);
30
}
31
27
use utf8;
32
use utf8;
28
33
29
use C4::Acquisition qw( get_rounded_price );
34
use C4::Acquisition qw( get_rounded_price );
Lines 31-42 use Koha::Number::Price; Link Here
31
use Koha::DateUtils qw( dt_from_string output_pref );
36
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Libraries;
37
use Koha::Libraries;
33
38
34
BEGIN {
39
use List::MoreUtils qw( uniq );
35
    use Exporter ();
36
    our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
37
    @ISA    = qw(Exporter);
38
    @EXPORT = qw(printpdf);
39
}
40
40
41
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
41
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
42
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
42
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
(-)a/Koha/pdfformat/layout3pagesfr.pm (-9 / +7 lines)
Lines 21-30 package Koha::pdfformat::layout3pagesfr; Link Here
21
21
22
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
22
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
23
24
use vars qw(@ISA @EXPORT);
24
use Modern::Perl;
25
use base 'Exporter';
26
27
BEGIN {
28
    our @EXPORT = qw(printpdf);
29
}
30
25
use MIME::Base64;
31
use MIME::Base64;
26
use List::MoreUtils qw( uniq );
32
use List::MoreUtils qw( uniq );
27
use Modern::Perl;
28
use utf8;
33
use utf8;
29
34
30
use C4::Acquisition;
35
use C4::Acquisition;
Lines 32-44 use Koha::Number::Price; Link Here
32
use Koha::DateUtils qw( dt_from_string output_pref );
37
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::Libraries;
38
use Koha::Libraries;
34
39
35
BEGIN {
36
    use Exporter ();
37
    our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
38
    @ISA    = qw(Exporter);
39
    @EXPORT = qw(printpdf);
40
}
41
42
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
40
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
43
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
41
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
44
use constant mm => 25.4 / 72;
42
use constant mm => 25.4 / 72;
(-)a/misc/translator/VerboseWarnings.pm (-23 / +11 lines)
Lines 1-8 Link Here
1
package VerboseWarnings;
1
package VerboseWarnings;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use base 'Exporter';
4
5
5
###############################################################################
6
BEGIN {
7
    our @EXPORT_OK = qw(
8
        pedantic_p
9
        warn_additional
10
        warn_normal
11
        warn_pedantic
12
        error_additional
13
        error_normal
14
    );
15
}
6
16
7
=head1 NAME
17
=head1 NAME
8
18
Lines 15-39 verbose warnings. Link Here
15
25
16
=cut
26
=cut
17
27
18
###############################################################################
19
20
our ( @ISA, @EXPORT_OK );
21
22
BEGIN {
23
    require Exporter;
24
    @ISA       = qw(Exporter);
25
    @EXPORT_OK = qw(
26
        pedantic_p
27
        warn_additional
28
        warn_normal
29
        warn_pedantic
30
        error_additional
31
        error_normal
32
    );
33
}
34
35
###############################################################################
36
37
use vars qw( $appName $input $input_abbr $pedantic_p $pedantic_tag $quiet);
28
use vars qw( $appName $input $input_abbr $pedantic_p $pedantic_tag $quiet);
38
use vars qw( $warned $erred );
29
use vars qw( $warned $erred );
39
30
Lines 123-127 sub warned { Link Here
123
}
114
}
124
115
125
1;
116
1;
126
127
###############################################################################
128
- 

Return to bug 40680