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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp 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 (-14 / +13 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://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 1245-1251 sub checkauth { Link Here
1245
                            : Koha::Cash::Registers->search(
1244
                            : Koha::Cash::Registers->search(
1246
                            { branch => $branchcode, branch_default => 1 },
1245
                            { branch => $branchcode, branch_default => 1 },
1247
                            { rows   => 1 }
1246
                            { rows   => 1 }
1248
                        )->single;
1247
                            )->single;
1249
                        $register_id   = $register->id   if ($register);
1248
                        $register_id   = $register->id   if ($register);
1250
                        $register_name = $register->name if ($register);
1249
                        $register_name = $register->name if ($register);
1251
                    }
1250
                    }
Lines 1455-1461 sub checkauth { Link Here
1455
    # get the inputs from the incoming query
1454
    # get the inputs from the incoming query
1456
    my @inputs          = ();
1455
    my @inputs          = ();
1457
    my @inputs_to_clean = qw( login_userid login_password ticket logout.x otp_token );
1456
    my @inputs_to_clean = qw( login_userid login_password ticket logout.x otp_token );
1458
    foreach my $name ( param $query) {
1457
    foreach my $name ( param $query ) {
1459
        next if grep { $name eq $_ } @inputs_to_clean;
1458
        next if grep { $name eq $_ } @inputs_to_clean;
1460
        my @value = $query->multi_param($name);
1459
        my @value = $query->multi_param($name);
1461
        push @inputs, { name => $name, value => $_ } for @value;
1460
        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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use 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 <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://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 (-7 / +3 lines)
Lines 20-33 package C4::Biblio; Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
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
Lines 1565-1571 sub GetAuthorisedValueDesc { Link Here
1565
                    Koha::AuthorisedValues->search(
1561
                    Koha::AuthorisedValues->search(
1566
                    { category => $category },
1562
                    { category => $category },
1567
                    { columns  => [ 'authorised_value', 'lib_opac', 'lib' ] }
1563
                    { columns  => [ 'authorised_value', 'lib_opac', 'lib' ] }
1568
                )->as_list
1564
                    )->as_list
1569
            };
1565
            };
1570
            $cache->set_in_cache( $cache_key, $av_descriptions );
1566
            $cache->set_in_cache( $cache_key, $av_descriptions );
1571
        }
1567
        }
(-)a/C4/Breeding.pm (-10 / +5 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 <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use strict;
21
use Modern::Perl;
22
use warnings;
22
use base 'Exporter';
23
BEGIN {
24
    our @EXPORT_OK = qw(BreedingSearch ImportBreedingAuth Z3950Search Z3950SearchAuth);
25
}
23
26
24
use C4::Biblio  qw(TransformMarcToKoha);
27
use C4::Biblio  qw(TransformMarcToKoha);
25
use C4::Koha    qw( GetVariationsOfISBN );
28
use C4::Koha    qw( GetVariationsOfISBN );
Lines 32-45 use C4::Languages; Link Here
32
use Koha::Database;
35
use Koha::Database;
33
use Koha::XSLT::Base;
36
use Koha::XSLT::Base;
34
37
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
38
=head1 NAME
44
39
45
C4::Breeding : module to add biblios to import_records via
40
C4::Breeding : module to add biblios to import_records via
(-)a/C4/Budgets.pm (-13 / +10 lines)
Lines 18-37 package C4::Budgets; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use 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
31
BEGIN {
22
BEGIN {
32
    require Exporter;
23
    our @EXPORT_OK = qw(
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
24
36
        GetBudget
25
        GetBudget
37
        GetBudgetByOrderNumber
26
        GetBudgetByOrderNumber
Lines 84-89 BEGIN { Link Here
84
    );
73
    );
85
}
74
}
86
75
76
use JSON;
77
use C4::Context;
78
use Koha::Database;
79
use Koha::Patrons;
80
use Koha::Acquisition::Invoice::Adjustments;
81
use C4::Acquisition;
82
use C4::Log qw(logaction);
83
87
# ----------------------------BUDGETS.PM-----------------------------";
84
# ----------------------------BUDGETS.PM-----------------------------";
88
85
89
=head1 FUNCTIONS ABOUT BUDGETS
86
=head1 FUNCTIONS ABOUT BUDGETS
(-)a/C4/Charset.pm (-13 / +9 lines)
Lines 18-37 package C4::Charset; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
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
31
BEGIN {
22
BEGIN {
32
    require Exporter;
23
    our @EXPORT_OK = qw(
33
    @ISA       = qw(Exporter);
34
    @EXPORT_OK = qw(
35
        NormalizeString
24
        NormalizeString
36
        IsStringUTF8ish
25
        IsStringUTF8ish
37
        MarcToUTF8Record
26
        MarcToUTF8Record
Lines 43-48 BEGIN { Link Here
43
    );
32
    );
44
}
33
}
45
34
35
use MARC::Charset;
36
use Text::Iconv;
37
use Unicode::Normalize qw( NFC NFD );
38
use Encode;
39
40
use Koha::Logger;
41
46
=encoding UTF-8
42
=encoding UTF-8
47
43
48
=head1 NAME
44
=head1 NAME
(-)a/C4/Circulation.pm (-56 / +54 lines)
Lines 19-84 package C4::Circulation; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://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
42
use Data::Dumper qw( Dumper );
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
22
23
use base 'Exporter';
75
BEGIN {
24
BEGIN {
76
25
77
    require Exporter;
78
    @ISA = qw(Exporter);
79
80
    # FIXME subs that should probably be elsewhere
26
    # FIXME subs that should probably be elsewhere
81
    push @EXPORT_OK, qw(
27
    our @EXPORT_OK = qw(
82
        barcodedecode
28
        barcodedecode
83
        LostItem
29
        LostItem
84
        ReturnLostItem
30
        ReturnLostItem
Lines 129-134 BEGIN { Link Here
129
    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
75
    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
130
}
76
}
131
77
78
use DateTime;
79
use POSIX qw( floor );
80
use Encode;
81
use Try::Tiny;
82
use JSON;
83
84
use C4::Context;
85
use C4::Stats qw( UpdateStats );
86
use C4::Reserves
87
    qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority IsAvailableForItemLevelRequest );
88
use C4::Biblio qw( UpdateTotalIssues );
89
use C4::Items  qw( ModItemTransfer ModDateLastSeen CartToShelf );
90
use C4::Accounts;
91
use C4::ItemCirculationAlertPreference;
92
use C4::Message;
93
use C4::Log qw( logaction );    # logaction
94
use C4::Overdues;
95
use C4::RotatingCollections qw(GetCollectionItemBranches);
96
use Algorithm::CheckDigits  qw( CheckDigits );
97
98
use Data::Dumper qw( Dumper );
99
use Koha::Account;
100
use Koha::AuthorisedValues;
101
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
102
use Koha::Biblioitems;
103
use Koha::DateUtils qw( dt_from_string );
104
use Koha::Calendar;
105
use Koha::Checkouts;
106
use Koha::ILL::Requests;
107
use Koha::Items;
108
use Koha::Patrons;
109
use Koha::Patron::Debarments qw( DelUniqueDebarment AddUniqueDebarment );
110
use Koha::Database;
111
use Koha::Libraries;
112
use Koha::Account::Lines;
113
use Koha::Holds;
114
use Koha::Account::Lines;
115
use Koha::Account::Offsets;
116
use Koha::Config::SysPrefs;
117
use Koha::Charges::Fees;
118
use Koha::Config::SysPref;
119
use Koha::Checkouts::ReturnClaims;
120
use Koha::SearchEngine::Indexer;
121
use Koha::Exceptions::Checkout;
122
use Koha::Plugins;
123
use Koha::Recalls;
124
use Koha::Library::Hours;
125
use Carp            qw( carp );
126
use List::MoreUtils qw( any );
127
use Scalar::Util    qw( looks_like_number blessed );
128
use Date::Calc      qw( Date_to_Days );
129
132
=head1 NAME
130
=head1 NAME
133
131
134
C4::Circulation - Koha circulation module
132
C4::Circulation - Koha circulation module
(-)a/C4/ClassSortRoutine.pm (-8 / +4 lines)
Lines 18-37 package C4::ClassSortRoutine; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
use base 'Exporter';
22
use Class::Factory::Util;
23
24
our ( @ISA, @EXPORT_OK );
25
26
BEGIN {
22
BEGIN {
27
    require Exporter;
23
    our @EXPORT_OK = qw(
28
    @ISA       = qw(Exporter);
29
    @EXPORT_OK = qw(
30
        GetSortRoutineNames
24
        GetSortRoutineNames
31
        GetClassSortKey
25
        GetClassSortKey
32
    );
26
    );
33
}
27
}
34
28
29
use Class::Factory::Util;
30
35
=head1 NAME 
31
=head1 NAME 
36
32
37
C4::ClassSortRoutine - base object for creation of classification sorting
33
C4::ClassSortRoutine - base object for creation of classification sorting
(-)a/C4/ClassSource.pm (-11 / +7 lines)
Lines 17-34 package C4::ClassSource; Link Here
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
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
28
BEGIN {
21
BEGIN {
29
    require Exporter;
22
    our @EXPORT_OK = qw(
30
    @ISA       = qw(Exporter);
31
    @EXPORT_OK = qw(
32
        GetClassSources
23
        GetClassSources
33
        GetClassSource
24
        GetClassSource
34
        GetClassSortRule
25
        GetClassSortRule
Lines 36-41 BEGIN { Link Here
36
    );
27
    );
37
}
28
}
38
29
30
use C4::Context;
31
use C4::ClassSortRoutine qw( GetClassSortKey );
32
33
use Koha::Cache::Memory::Lite;
34
39
=head1 NAME
35
=head1 NAME
40
36
41
C4::ClassSources - handle classification sources in Koha
37
C4::ClassSources - handle classification sources in Koha
(-)a/C4/ClassSplitRoutine.pm (-8 / +4 lines)
Lines 18-36 package C4::ClassSplitRoutine; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
use base 'Exporter';
22
use Class::Factory::Util;
23
24
our ( @ISA, @EXPORT_OK );
25
26
BEGIN {
22
BEGIN {
27
    require Exporter;
23
    our @EXPORT_OK = qw(
28
    @ISA       = qw(Exporter);
29
    @EXPORT_OK = qw(
30
        GetSplitRoutineNames
24
        GetSplitRoutineNames
31
    );
25
    );
32
}
26
}
33
27
28
use Class::Factory::Util;
29
34
=head1 NAME
30
=head1 NAME
35
31
36
C4::ClassSplitRoutine - base object for creation of classification splitting routines
32
C4::ClassSplitRoutine - base object for creation of classification splitting routines
(-)a/C4/CourseReserves.pm (-16 / +12 lines)
Lines 16-39 package C4::CourseReserves; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
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
33
BEGIN {
21
BEGIN {
34
    require Exporter;
22
    our @EXPORT_OK = qw(
35
    @ISA       = qw(Exporter);
36
    @EXPORT_OK = qw(
37
        GetCourse
23
        GetCourse
38
        ModCourse
24
        ModCourse
39
        GetCourses
25
        GetCourses
Lines 58-63 BEGIN { Link Here
58
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
44
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
59
}
45
}
60
46
47
use List::MoreUtils qw( any );
48
49
use C4::Context;
50
51
use Koha::Courses;
52
use Koha::Course::Instructors;
53
use Koha::Course::Items;
54
use Koha::Course::Reserves;
55
use Koha::Checkouts;
56
61
=head1 NAME
57
=head1 NAME
62
58
63
C4::CourseReserves - Koha course reserves module
59
C4::CourseReserves - Koha course reserves module
(-)a/C4/External/BakerTaylor.pm (-7 / +6 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 <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
22
use base 'Exporter';
23
BEGIN {
24
    our @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
25
}
26
21
use XML::Simple;
27
use XML::Simple;
22
use LWP::Simple qw( get );
28
use LWP::Simple qw( get );
23
29
24
use C4::Context;
30
use C4::Context;
25
31
26
use Modern::Perl;
27
28
use vars qw(%EXPORT_TAGS $VERSION);
32
use vars qw(%EXPORT_TAGS $VERSION);
29
our ( @ISA, @EXPORT_OK );
30
31
BEGIN {
33
BEGIN {
32
    require Exporter;
33
    @ISA       = qw(Exporter);
34
    $VERSION   = 3.07.00.049;
34
    $VERSION   = 3.07.00.049;
35
    @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
36
}
35
}
37
36
38
# These variables are plack safe: they are initialized each time
37
# These variables are plack safe: they are initialized each time
(-)a/C4/Heading.pm (+6 lines)
Lines 18-23 package C4::Heading; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        new_from_field
25
    )
26
}
21
27
22
use MARC::Field;
28
use MARC::Field;
23
use C4::Context;
29
use C4::Context;
(-)a/C4/HoldsQueue.pm (-19 / +14 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
BEGIN {
25
    our @EXPORT_OK = qw(
26
        CreateQueue
27
        GetHoldsQueueItems
28
29
        TransportCostMatrix
30
        UpdateTransportCostMatrix
31
        GetPendingHoldRequestsForBib
32
        load_branches_to_pull_from
33
        update_queue_for_biblio
34
    );
35
}
24
36
25
use C4::Context;
37
use C4::Context;
26
use C4::Circulation qw( GetBranchItemRule );
38
use C4::Circulation qw( GetBranchItemRule );
Lines 35-57 use List::Util qw( shuffle ); Link Here
35
use List::MoreUtils    qw( any );
47
use List::MoreUtils    qw( any );
36
use Algorithm::Munkres qw();
48
use Algorithm::Munkres qw();
37
49
38
our ( @ISA, @EXPORT_OK );
39
40
BEGIN {
41
    require Exporter;
42
    @ISA       = qw(Exporter);
43
    @EXPORT_OK = qw(
44
        CreateQueue
45
        GetHoldsQueueItems
46
47
        TransportCostMatrix
48
        UpdateTransportCostMatrix
49
        GetPendingHoldRequestsForBib
50
        load_branches_to_pull_from
51
        update_queue_for_biblio
52
    );
53
}
54
55
=head1 FUNCTIONS
50
=head1 FUNCTIONS
56
51
57
=head2 TransportCostMatrix
52
=head2 TransportCostMatrix
(-)a/C4/ImportBatch.pm (-30 / +26 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://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
47
BEGIN {
22
BEGIN {
48
    require Exporter;
23
    our @EXPORT_OK = qw(
49
    @ISA       = qw(Exporter);
50
    @EXPORT_OK = qw(
51
        GetZ3950BatchId
24
        GetZ3950BatchId
52
        GetWebserviceBatchId
25
        GetWebserviceBatchId
53
        GetImportRecordMarc
26
        GetImportRecordMarc
Lines 97-102 BEGIN { Link Here
97
    );
70
    );
98
}
71
}
99
72
73
use C4::Context;
74
use C4::Koha   qw( GetNormalizedISBN );
75
use C4::Biblio qw(
76
    AddBiblio
77
    DelBiblio
78
    GetMarcFromKohaField
79
    GetXmlBiblio
80
    ModBiblio
81
    TransformMarcToKoha
82
);
83
use C4::Items   qw( AddItemFromMarc ModItemFromMarc );
84
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
85
use C4::AuthoritiesMarc
86
    qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
87
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
88
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
89
use Koha::Items;
90
use Koha::SearchEngine;
91
use Koha::SearchEngine::Indexer;
92
use Koha::Plugins::Handler;
93
use Koha::Logger;
94
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 / +10 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        ExportFramework
25
        ImportFramework
26
        createODS
27
    );
28
}
29
22
use XML::LibXML;
30
use XML::LibXML;
23
use XML::LibXML::XPathContext;
31
use XML::LibXML::XPathContext;
24
use Digest::MD5;
32
use Digest::MD5;
Lines 29-46 use List::MoreUtils qw( indexes ); Link Here
29
use C4::Context;
37
use C4::Context;
30
use Koha::Logger;
38
use Koha::Logger;
31
39
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"?>
40
use constant XMLSTR => '<?xml version="1.0" encoding="UTF-8"?>
45
<?mso-application progid="Excel.Sheet"?>
41
<?mso-application progid="Excel.Sheet"?>
46
<Workbook
42
<Workbook
(-)a/C4/InstallAuth.pm (-12 / +8 lines)
Lines 18-44 package C4::InstallAuth; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        checkauth
25
        get_template_and_user
26
    );
27
}
28
21
use CGI::Session;
29
use CGI::Session;
22
use File::Spec;
30
use File::Spec;
23
31
24
require Exporter;
25
26
use C4::Context;
32
use C4::Context;
27
use C4::Output qw( output_html_with_http_headers );
33
use C4::Output qw( output_html_with_http_headers );
28
use C4::Templates;
34
use C4::Templates;
29
35
30
use Koha::Session;
36
use Koha::Session;
31
37
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
38
=head1 NAME
43
39
44
InstallAuth - Authenticates Koha users for Install process
40
InstallAuth - Authenticates Koha users for Install process
(-)a/C4/Items.pm (-7 / +2 lines)
Lines 19-32 package C4::Items; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://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
25
BEGIN {
23
BEGIN {
26
    require Exporter;
24
    our @EXPORT_OK = qw(
27
    @ISA = qw(Exporter);
28
29
    @EXPORT_OK = qw(
30
        AddItemFromMarc
25
        AddItemFromMarc
31
        AddItemBatchFromMarc
26
        AddItemBatchFromMarc
32
        ModItemFromMarc
27
        ModItemFromMarc
(-)a/C4/Koha.pm (-13 / +10 lines)
Lines 20-40 package C4::Koha; Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
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 (-16 / +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 <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://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
34
BEGIN {
23
BEGIN {
35
    require Exporter;
24
    our @EXPORT_OK = qw(
36
    @ISA       = qw(Exporter);
37
    @EXPORT_OK = qw(
38
        getFrameworkLanguages
25
        getFrameworkLanguages
39
        getTranslatedLanguages
26
        getTranslatedLanguages
40
        getLanguages
27
        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);
31
        qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
45
}
32
}
46
33
34
use Carp qw( carp );
35
use CGI;
36
use List::MoreUtils qw( any );
37
use C4::Context;
38
use Koha::Caches;
39
use Koha::Cache::Memory::Lite;
40
use Koha::Language;
41
47
=head1 NAME
42
=head1 NAME
48
43
49
C4::Languages - Perl Module containing language list functions for Koha 
44
C4::Languages - Perl Module containing language list functions for Koha 
(-)a/C4/Letters.pm (-24 / +20 lines)
Lines 18-23 package C4::Letters; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        GetLetters
25
        GetLettersAvailableForALibrary
26
        GetLetterTemplates
27
        DelLetter
28
        GetPreparedLetter
29
        GetWrappedLetter
30
        SendAlerts
31
        GetPrintMessages
32
        GetQueuedMessages
33
        GetMessage
34
        GetMessageTransportTypes
35
36
        EnqueueLetter
37
        SendQueuedMessages
38
        ResendMessage
39
    );
40
}
21
41
22
use Carp qw( carp croak );
42
use Carp qw( carp croak );
23
use Template;
43
use Template;
Lines 44-73 use Koha::Template::Plugin::KohaDates; Link Here
44
64
45
use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822';
65
use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822';
46
66
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 = {};
67
our $domain_limits = {};
72
68
73
=head1 NAME
69
=head1 NAME
(-)a/C4/Members.pm (-12 / +9 lines)
Lines 20-25 package C4::Members; Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use base 'Exporter';
24
BEGIN {
25
    our @EXPORT_OK = qw(
26
        GetBorrowersToExpunge
27
28
        IssueSlip
29
    );
30
}
31
23
use C4::Context;
32
use C4::Context;
24
use Scalar::Util qw( looks_like_number );
33
use Scalar::Util qw( looks_like_number );
25
use Date::Calc   qw( check_date Date_to_Days );
34
use Date::Calc   qw( check_date Date_to_Days );
Lines 36-53 use Koha::AdditionalContents; Link Here
36
use Koha::Patrons;
45
use Koha::Patrons;
37
use Koha::Patron::Categories;
46
use Koha::Patron::Categories;
38
47
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
48
=head1 NAME
52
49
53
C4::Members - Perl Module containing convenience functions for member handling
50
C4::Members - Perl Module containing convenience functions for member handling
(-)a/C4/Members/Messaging.pm (-2 / +10 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use strict;
20
use base 'Exporter';
21
use warnings;
21
BEGIN {
22
    our @EXPORT_OK = qw(
23
        GetMessagingPreferences
24
        SetMessagingPreference
25
        GetMessagingOptions
26
        SetMessagingPreferencesFromDefaults
27
    )
28
}
29
22
use C4::Context;
30
use C4::Context;
23
31
24
=head1 NAME
32
=head1 NAME
(-)a/C4/Members/Statistics.pm (-9 / +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
31
BEGIN {
27
BEGIN {
32
    require Exporter;
28
    our @EXPORT_OK = qw(
33
    @ISA = qw(Exporter);
34
35
    @EXPORT_OK = qw(
36
        get_fields
29
        get_fields
37
        GetTotalIssuesTodayByBorrower
30
        GetTotalIssuesTodayByBorrower
38
        GetTotalIssuesReturnedTodayByBorrower
31
        GetTotalIssuesReturnedTodayByBorrower
Lines 40-45 BEGIN { Link Here
40
    );
33
    );
41
}
34
}
42
35
36
use C4::Context;
37
43
=head2 get_fields
38
=head2 get_fields
44
  Get fields form syspref 'StatisticsFields'
39
  Get fields form syspref 'StatisticsFields'
45
  Returns list of valid fields, defaults to 'location|itype|ccode'
40
  Returns list of valid fields, defaults to 'location|itype|ccode'
(-)a/C4/Output.pm (-15 / +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
39
BEGIN {
29
BEGIN {
40
    require Exporter;
30
    our @EXPORT_OK = qw(
41
42
    @ISA       = qw(Exporter);
43
    @EXPORT_OK = qw(
44
        is_ajax
31
        is_ajax
45
        ajax_fail
32
        ajax_fail
46
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
33
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
Lines 49-54 BEGIN { Link Here
49
    );
36
    );
50
}
37
}
51
38
39
use HTML::Entities;
40
use Scalar::Util qw( looks_like_number );
41
use URI::Escape;
42
43
use C4::Auth qw( get_template_and_user );
44
use C4::Context;
45
use C4::Templates;
46
52
=head1 NAME
47
=head1 NAME
53
48
54
C4::Output - Functions for managing output, is slowly being deprecated
49
C4::Output - Functions for managing output, is slowly being deprecated
(-)a/C4/Overdues.pm (-22 / +18 lines)
Lines 19-24 package C4::Overdues; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use base 'Exporter';
23
BEGIN {
24
    # subs to rename (and maybe merge some...)
25
    our @EXPORT_OK = qw(
26
        CalcFine
27
        Getoverdues
28
        checkoverdues
29
        UpdateFine
30
        GetFine
31
        GetBranchcodesWithOverdueRules
32
        get_chargeable_units
33
        GetOverduesForBranch
34
        GetOverdueMessageTransportTypes
35
        parse_overdues_letter
36
        GetIssuesIteminfo
37
    );
38
}
39
22
use Date::Calc                    qw( Today );
40
use Date::Calc                    qw( Today );
23
use Date::Manip                   qw( UnixDate );
41
use Date::Manip                   qw( UnixDate );
24
use List::MoreUtils               qw( uniq );
42
use List::MoreUtils               qw( uniq );
Lines 36-63 use Koha::Recalls; Link Here
36
use Koha::Logger;
54
use Koha::Logger;
37
use Koha::Patrons;
55
use Koha::Patrons;
38
56
39
our ( @ISA, @EXPORT_OK );
40
41
BEGIN {
42
    require Exporter;
43
    @ISA = qw(Exporter);
44
45
    # subs to rename (and maybe merge some...)
46
    @EXPORT_OK = qw(
47
        CalcFine
48
        Getoverdues
49
        checkoverdues
50
        UpdateFine
51
        GetFine
52
        GetBranchcodesWithOverdueRules
53
        get_chargeable_units
54
        GetOverduesForBranch
55
        GetOverdueMessageTransportTypes
56
        parse_overdues_letter
57
        GetIssuesIteminfo
58
    );
59
}
60
61
=head1 NAME
57
=head1 NAME
62
58
63
C4::Circulation::Fines - Koha module dealing with fines
59
C4::Circulation::Fines - Koha module dealing with fines
(-)a/C4/Reports.pm (-9 / +6 lines)
Lines 18-37 package C4::Reports; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use base 'Exporter';
22
23
use C4::Context;
24
25
our ( @ISA, @EXPORT_OK );
26
27
BEGIN {
22
BEGIN {
28
    require Exporter;
23
    our @EXPORT_OK = qw(
29
    @ISA       = qw(Exporter);
30
    @EXPORT_OK = qw(
31
        GetDelimiterChoices
24
        GetDelimiterChoices
32
    );
25
    );
33
}
26
}
34
27
28
use CGI qw ( -utf8 );
29
30
use C4::Context;
31
35
=head1 NAME
32
=head1 NAME
36
33
37
C4::Reports - Module for generating reports 
34
C4::Reports - Module for generating reports 
(-)a/C4/Reports/Guided.pm (-22 / +18 lines)
Lines 18-23 package C4::Reports::Guided; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
25
        save_report get_saved_reports execute_query
26
        get_column_type get_distinct_values save_dictionary get_from_dictionary
27
        delete_definition delete_report store_results format_results get_sql get_results
28
        nb_rows update_sql
29
        strip_limit
30
        convert_sql
31
        GetReservedAuthorisedValues
32
        GetParametersFromSQL
33
        IsAuthorisedValueValid
34
        ValidateSQLParameters
35
        nb_rows update_sql
36
        EmailReport
37
    );
38
}
21
39
22
use CGI  qw ( -utf8 );
40
use CGI  qw ( -utf8 );
23
use Carp qw( carp croak );
41
use Carp qw( carp croak );
Lines 39-66 use Koha::Reports; Link Here
39
use Koha::SharedContent;
57
use Koha::SharedContent;
40
use Koha::TemplateUtils qw( process_tt );
58
use Koha::TemplateUtils qw( process_tt );
41
59
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
60
=head1 NAME
65
61
66
C4::Reports::Guided - Module for generating guided reports 
62
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 <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use 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 C4::Accounts;
66
use C4::Accounts;
26
use C4::Biblio      qw( GetMarcFromKohaField );
67
use C4::Biblio      qw( GetMarcFromKohaField );
Lines 96-145 This modules provides some functions to deal with reservations. Link Here
96
137
97
=cut
138
=cut
98
139
99
our ( @ISA, @EXPORT_OK );
100
101
BEGIN {
102
    require Exporter;
103
    @ISA       = qw(Exporter);
104
    @EXPORT_OK = qw(
105
        AddReserve
106
107
        GetReserveStatus
108
109
        ChargeReserveFee
110
        GetReserveFee
111
112
        ModReserveAffect
113
        ModReserve
114
        ModReserveStatus
115
        ModReserveCancelAll
116
        ModReserveMinusPriority
117
        MoveReserve
118
119
        CheckReserves
120
        CanBookBeReserved
121
        CanItemBeReserved
122
        CancelExpiredReserves
123
124
        AutoUnsuspendReserves
125
126
        IsAvailableForItemLevelRequest
127
        ItemsAnyAvailableAndNotRestricted
128
129
        AlterPriority
130
        ToggleLowestPriority
131
132
        ReserveSlip
133
        SuspendAll
134
135
        CalculatePriority
136
137
        GetMaxPatronHoldsForRecord
138
139
        MergeHolds
140
    );
141
}
142
143
=head2 AddReserve
140
=head2 AddReserve
144
141
145
    AddReserve(
142
    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 (-6 / +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;
5
BEGIN {
6
6
    our @EXPORT_OK = qw(checksum verify_cksum);
7
our @ISA       = qw(Exporter);
7
}
8
our @EXPORT_OK = qw(checksum verify_cksum);
9
8
10
sub checksum {
9
sub checksum {
11
    my $pkt = shift;
10
    my $pkt = shift;
(-)a/C4/Scheduler.pm (-8 / +4 lines)
Lines 18-35 package C4::Scheduler; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
24
}
21
25
22
use C4::Context;
26
use C4::Context;
23
use Schedule::At;
27
use Schedule::At;
24
28
25
our ( @ISA, @EXPORT_OK );
26
27
BEGIN {
28
    require Exporter;
29
    @ISA       = qw(Exporter);
30
    @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
31
}
32
33
=head1 NAME
29
=head1 NAME
34
30
35
C4::Scheduler - Module for running jobs with the unix at command
31
C4::Scheduler - Module for running jobs with the unix at command
(-)a/C4/Search.pm (-19 / +16 lines)
Lines 16-21 package C4::Search; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use base 'Exporter';
20
BEGIN {
21
    our @EXPORT_OK = qw(
22
        FindDuplicate
23
        SimpleSearch
24
        searchResults
25
        getRecords
26
        buildQuery
27
        GetDistinctValues
28
        enabled_staff_search_views
29
        new_record_from_zebra
30
        z3950_search_args
31
        getIndexes
32
    );
33
}
34
19
use C4::Context;
35
use C4::Context;
20
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
36
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
21
use C4::Koha
37
use C4::Koha
Lines 43-67 use MARC::Field; Link Here
43
use POSIX qw(setlocale LC_COLLATE);
59
use POSIX qw(setlocale LC_COLLATE);
44
use Unicode::Collate::Locale;
60
use Unicode::Collate::Locale;
45
61
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
62
=head1 NAME
66
63
67
C4::Search - Functions for searching the Koha catalog.
64
C4::Search - Functions for searching the Koha catalog.
(-)a/C4/Serials.pm (-38 / +34 lines)
Lines 19-24 package C4::Serials; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use base 'Exporter';
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        NewSubscription    ModSubscription    DelSubscription
26
        GetSubscription    CountSubscriptionFromBiblionumber      GetSubscriptionsFromBiblionumber
27
        SearchSubscriptions
28
        GetFullSubscriptionsFromBiblionumber   GetFullSubscription ModSubscriptionHistory
29
        HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
30
        GetFictiveIssueNumber
31
        GetSubscriptionHistoryFromSubscriptionId
32
33
        GetNextSeq GetSeq NewIssue           GetSerials
34
        GetLatestSerials   ModSerialStatus    GetNextDate
35
        CloseSubscription ReopenSubscription
36
        subscriptionCurrentlyOnOrder
37
        can_claim_subscription can_edit_subscription can_show_subscription
38
        GetSerials2
39
        GetSubscriptionLength ReNewSubscription  GetLateOrMissingIssues
40
        GetSerialInformation                   AddItem2Serial
41
        PrepareSerialsData GetNextExpected    ModNextExpected
42
        GetSubscriptionIrregularities
43
        GetPreviousSerialid
44
45
        GetSuppliersWithLateIssues
46
        getroutinglist     delroutingmember   addroutingmember
47
        reorder_members
48
        check_routing updateClaim
49
        CountIssues
50
        HasItems
51
52
        findSerialsByStatus
53
54
    );
55
}
22
56
23
use Carp       qw( croak );
57
use Carp       qw( croak );
24
use Date::Calc qw(
58
use Date::Calc qw(
Lines 73-116 use constant MISSING_STATUSES => ( Link Here
73
    MISSING_LOST
107
    MISSING_LOST
74
);
108
);
75
109
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
110
=head1 NAME
115
111
116
C4::Serials - Serials Module Functions
112
C4::Serials - Serials Module Functions
(-)a/C4/ShelfBrowser.pm (-12 / +7 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use strict;
20
use Modern::Perl;
21
use warnings;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        GetNearbyItems
25
    );
26
}
22
27
23
use C4::Biblio qw( GetAuthorisedValueDesc );
28
use C4::Biblio qw( GetAuthorisedValueDesc );
24
use C4::Context;
29
use C4::Context;
Lines 26-41 use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetN Link Here
26
use Koha::Biblios;
31
use Koha::Biblios;
27
use Koha::Libraries;
32
use Koha::Libraries;
28
33
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
34
=head1 NAME
40
35
41
C4::ShelfBrowser - functions that deal with the shelf browser feature found in
36
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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
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 / +18 lines)
Lines 19-24 package C4::Suggestions; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use base 'Exporter';
23
BEGIN {
24
    our @EXPORT = qw(
25
        ConnectSuggestionAndBiblio
26
        DelSuggestion
27
        GetSuggestion
28
        GetSuggestionByStatus
29
        GetSuggestionFromBiblionumber
30
        GetSuggestionInfoFromBiblionumber
31
        GetSuggestionInfo
32
        ModStatus
33
        ModSuggestion
34
        DelSuggestionsOlderThan
35
        GetUnprocessedSuggestions
36
        MarcRecordFromNewSuggestion
37
    );
38
}
39
22
use CGI qw ( -utf8 );
40
use CGI qw ( -utf8 );
23
41
24
use C4::Context;
42
use C4::Context;
Lines 29-51 use Koha::DateUtils qw( dt_from_string ); Link Here
29
use Koha::Suggestions;
47
use Koha::Suggestions;
30
use C4::Log qw(logaction);
48
use C4::Log qw(logaction);
31
49
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
50
=head1 NAME
50
51
51
C4::Suggestions - Some useful functions for dealings with aqorders.
52
C4::Suggestions - Some useful functions for dealings with aqorders.
(-)a/C4/Tags.pm (-16 / +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 <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://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
36
BEGIN {
24
BEGIN {
37
    @ISA       = qw(Exporter);
25
    our @EXPORT_OK = qw(
38
    @EXPORT_OK = qw(
39
        get_tags get_tag_rows
26
        get_tags get_tag_rows
40
        add_tags
27
        add_tags
41
        add_tag
28
        add_tag
Lines 64-69 BEGIN { Link Here
64
    }
51
    }
65
}
52
}
66
53
54
use Carp qw( carp );
55
56
use Module::Load::Conditional qw( check_install );
57
use Koha::Tags;
58
use Koha::Tags::Approvals;
59
use Koha::Tags::Indexes;
60
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
61
use constant TAG_SELECT => "SELECT " . join( ',', TAG_FIELDS ) . "\n FROM   tags_all\n";
62
67
=head1 C4::Tags.pm - Support for user tagging of biblios.
63
=head1 C4::Tags.pm - Support for user tagging of biblios.
68
64
69
=cut
65
=cut
(-)a/C4/TmplTokenType.pm (-7 / +2 lines)
Lines 18-24 package C4::TmplTokenType; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
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 / +7 lines)
Lines 19-24 package C4::XISBN; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use base 'Exporter';
23
BEGIN {
24
    our @EXPORT_OK = qw(
25
        get_xisbns
26
    );
27
}
28
22
use XML::Simple;
29
use XML::Simple;
23
30
24
use C4::Biblio              qw(TransformMarcToKoha);
31
use C4::Biblio              qw(TransformMarcToKoha);
Lines 31-46 use Koha::Biblios; Link Here
31
use Koha::SearchEngine;
38
use Koha::SearchEngine;
32
use Koha::SearchEngine::Search;
39
use Koha::SearchEngine::Search;
33
40
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
41
=head1 NAME
45
42
46
C4::XISBN - Functions for retrieving XISBN content in Koha
43
C4::XISBN - Functions for retrieving XISBN content in Koha
(-)a/C4/XSLT.pm (-15 / +12 lines)
Lines 22-52 package C4::XSLT; Link Here
22
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
use base 'Exporter';
26
use C4::Context;
27
use C4::Koha   qw( xml_escape );
28
use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure );
29
use Koha::AuthorisedValues;
30
use Koha::ItemTypes;
31
use Koha::RecordProcessor;
32
use Koha::XSLT::Base;
26
use Koha::XSLT::Base;
33
use Koha::Libraries;
34
use Koha::Recalls;
35
36
my $engine;    #XSLT Handler object
27
my $engine;    #XSLT Handler object
37
28
38
our ( @ISA, @EXPORT_OK );
39
40
BEGIN {
29
BEGIN {
41
    require Exporter;
30
    our @EXPORT_OK = qw(
42
    @ISA       = qw(Exporter);
43
    @EXPORT_OK = qw(
44
        buildKohaItemsNamespace
31
        buildKohaItemsNamespace
45
        XSLTParse4Display
32
        XSLTParse4Display
46
    );
33
    );
47
    $engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
34
    $engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
48
}
35
}
49
36
37
38
use C4::Context;
39
use C4::Koha   qw( xml_escape );
40
use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure );
41
use Koha::AuthorisedValues;
42
use Koha::ItemTypes;
43
use Koha::RecordProcessor;
44
use Koha::Libraries;
45
use Koha::Recalls;
46
50
=head1 NAME
47
=head1 NAME
51
48
52
C4::XSLT - Functions for displaying XSLT-generated content
49
C4::XSLT - Functions for displaying XSLT-generated content
(-)a/Koha/AuthUtils.pm (-8 / +5 lines)
Lines 18-23 package Koha::AuthUtils; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
24
}
25
21
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
26
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
22
use Encode;
27
use Encode;
23
use Fcntl           qw( O_RDONLY );        # O_RDONLY is used in generate_salt
28
use Fcntl           qw( O_RDONLY );        # O_RDONLY is used in generate_salt
Lines 27-40 use Koha::Exceptions::Password; Link Here
27
32
28
use C4::Context;
33
use C4::Context;
29
34
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
35
=head1 NAME
39
36
40
Koha::AuthUtils - utility routines for authentication
37
Koha::AuthUtils - utility routines for authentication
(-)a/Koha/DateUtils.pm (-11 / +7 lines)
Lines 17-34 package Koha::DateUtils; Link Here
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use 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
27
BEGIN {
21
BEGIN {
28
    require Exporter;
22
    our @EXPORT_OK = qw(
29
    @ISA = qw(Exporter);
30
31
    @EXPORT_OK = qw(
32
        dt_from_string
23
        dt_from_string
33
        output_pref
24
        output_pref
34
        format_sqldatetime
25
        format_sqldatetime
Lines 36-41 BEGIN { Link Here
36
    );
27
    );
37
}
28
}
38
29
30
use DateTime;
31
use C4::Context;
32
use Koha::Exceptions;
33
use Koha::DateTime::Format::RFC3339;
34
39
=head1 DateUtils
35
=head1 DateUtils
40
36
41
Koha::DateUtils - Transitional wrappers to ease use of DateTime
37
Koha::DateUtils - Transitional wrappers to ease use of DateTime
(-)a/Koha/Devel/Files.pm (-1 lines)
Lines 1-7 Link Here
1
package Koha::Devel::Files;
1
package Koha::Devel::Files;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
our ( @ISA, @EXPORT_OK );
5
4
6
=head1 NAME
5
=head1 NAME
7
6
(-)a/Koha/EDI.pm (-16 / +11 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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://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
BEGIN {
23
    our @EXPORT_OK = qw(
24
        process_quote
25
        process_invoice
26
        process_ordrsp
27
        create_edi_order
28
        get_edifact_ean
29
    );
30
}
31
23
use utf8;
32
use utf8;
24
use English qw{ -no_match_vars };
33
use English qw{ -no_match_vars };
25
use Business::ISBN;
34
use Business::ISBN;
Lines 48-67 use Koha::Util::FrameworkPlugin qw( biblio_008 ); Link Here
48
57
49
our $VERSION = 1.1;
58
our $VERSION = 1.1;
50
59
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 {
60
sub create_edi_order {
66
    my $parameters = shift;
61
    my $parameters = shift;
67
    my $basketno   = $parameters->{basketno};
62
    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 <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
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 (-6 / +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
7
BEGIN {
5
BEGIN {
8
    require Exporter;
6
    our @EXPORT_OK = qw(
9
    @ISA       = qw(Exporter);
10
    @EXPORT_OK = qw(
11
        AddItemSearchField
7
        AddItemSearchField
12
        ModItemSearchField
8
        ModItemSearchField
13
        DelItemSearchField
9
        DelItemSearchField
(-)a/Koha/List/Patron.pm (-10 / +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
36
BEGIN {
30
BEGIN {
37
    require Exporter;
31
    our @EXPORT_OK = qw(
38
    @ISA       = qw(Exporter);
39
    @EXPORT_OK = qw(
40
        GetPatronLists
32
        GetPatronLists
41
33
42
        DelPatronList
34
        DelPatronList
Lines 48-53 BEGIN { Link Here
48
    );
40
    );
49
}
41
}
50
42
43
use Carp qw( carp croak );
44
45
use Koha::Database;
46
51
=head2 GetPatronLists
47
=head2 GetPatronLists
52
48
53
    my @lists = GetPatronLists( $params );
49
    my @lists = GetPatronLists( $params );
(-)a/Koha/Patron/Debarments.pm (-14 / +10 lines)
Lines 18-38 package Koha::Patron::Debarments; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
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
32
BEGIN {
22
BEGIN {
33
    require Exporter;
23
    our @EXPORT_OK = qw(
34
    @ISA       = qw(Exporter);
35
    @EXPORT_OK = qw(
36
        AddDebarment
24
        AddDebarment
37
        DelDebarment
25
        DelDebarment
38
        ModDebarment
26
        ModDebarment
Lines 43-48 BEGIN { Link Here
43
    );
31
    );
44
}
32
}
45
33
34
use C4::Context;
35
use C4::Log qw( logaction );
36
37
use Koha::Database;
38
use Koha::Patrons;
39
use Koha::Patron::Restriction::Types;
40
use Koha::Patron::Restrictions;
41
46
=head1 Koha::Patron::Debarments
42
=head1 Koha::Patron::Debarments
47
43
48
Koha::Patron::Debarments - Module for managing patron debarments
44
Koha::Patron::Debarments - Module for managing patron debarments
(-)a/Koha/Patron/Password/Recovery.pm (-14 / +11 lines)
Lines 18-23 package Koha::Patron::Password::Recovery; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw(
24
        ValidateBorrowernumber
25
        SendPasswordRecoveryEmail
26
        GetValidLinkInfo
27
        CompletePasswordRecovery
28
        DeleteExpiredPasswordRecovery
29
    );
30
}
31
21
use C4::Context;
32
use C4::Context;
22
use C4::Letters;
33
use C4::Letters;
23
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
34
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
Lines 26-45 use Koha::DateUtils qw( dt_from_string ); Link Here
26
use constant PATRON => 2;
37
use constant PATRON => 2;
27
use constant STAFF  => 5;
38
use constant STAFF  => 5;
28
39
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
40
=head1 NAME
44
41
45
Koha::Patron::Password::Recovery - Koha password recovery module
42
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 <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
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 / +4 lines)
Lines 18-23 package Koha::TemplateUtils; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use base 'Exporter';
22
BEGIN {
23
    our @EXPORT_OK = qw( process_tt );
24
}
21
25
22
use Carp qw( croak );
26
use Carp qw( croak );
23
use Try::Tiny;
27
use Try::Tiny;
Lines 25-38 use Template; Link Here
25
29
26
use C4::Context;
30
use C4::Context;
27
31
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
32
=head1 NAME
37
33
38
Koha::TemplateUtils
34
Koha::TemplateUtils
(-)a/Koha/Util/FrameworkPlugin.pm (-8 / +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
29
BEGIN {
25
BEGIN {
30
    require Exporter;
26
    our @EXPORT_OK = qw( wrapper date_entered biblio_008 );
31
    @ISA       = qw( Exporter );
32
    @EXPORT_OK = qw( wrapper date_entered biblio_008 );
33
}
27
}
34
28
29
use constant DEFAULT_008_POS_6_39 => 'b        |||||||| |||| 00| 0 eng d';
30
35
=head1 NAME
31
=head1 NAME
36
32
37
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
33
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
(-)a/Koha/Util/StockRotation.pm (-12 / +7 lines)
Lines 20-37 package Koha::Util::StockRotation; Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
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
30
BEGIN {
24
BEGIN {
31
    require Exporter;
25
    our @EXPORT_OK = qw(
32
    @ISA       = qw( Exporter );
33
    @EXPORT    = qw( );
34
    @EXPORT_OK = qw(
35
        get_branches
26
        get_branches
36
        get_stages
27
        get_stages
37
        toggle_indemand
28
        toggle_indemand
Lines 40-48 BEGIN { Link Here
40
        add_items_to_rota
31
        add_items_to_rota
41
        move_to_next_stage
32
        move_to_next_stage
42
    );
33
    );
43
    %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
34
    our %EXPORT_TAGS = ( ALL => [ @EXPORT_OK ] );
44
}
35
}
45
36
37
use Koha::Items;
38
use Koha::StockRotationItems;
39
use Koha::Database;
40
46
=head1 NAME
41
=head1 NAME
47
42
48
Koha::Util::StockRotation - utility class with routines for Stock Rotation
43
Koha::Util::StockRotation - utility class with routines for Stock Rotation
(-)a/Koha/pdfformat/layout1page.pm (-8 / +5 lines)
Lines 18-38 package Koha::pdfformat::layout1page; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
#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
BEGIN {
24
    our @EXPORT = qw(printpdf);
25
}
26
23
use utf8;
27
use utf8;
24
28
25
use Koha::Number::Price;
29
use Koha::Number::Price;
26
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::DateUtils qw( dt_from_string output_pref );
27
use Koha::Libraries;
31
use Koha::Libraries;
28
32
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).
33
#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.
34
#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;
35
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout2pages.pm (-8 / +5 lines)
Lines 21-41 package Koha::pdfformat::layout2pages; Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
#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
BEGIN {
27
    our @EXPORT = qw(printpdf);
28
}
29
26
use utf8;
30
use utf8;
27
31
28
use Koha::Number::Price;
32
use Koha::Number::Price;
29
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Libraries;
34
use Koha::Libraries;
31
35
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).
36
#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.
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.
41
use constant mm => 25.4 / 72;
38
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout2pagesde.pm (-8 / +5 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
BEGIN {
27
    our @EXPORT_OK = qw(printpdf);
28
}
29
25
use utf8;
30
use utf8;
26
31
27
use Koha::Number::Price;
32
use Koha::Number::Price;
28
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils qw( dt_from_string output_pref );
29
use Koha::Libraries;
34
use Koha::Libraries;
30
35
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).
36
#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.
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.
41
use constant mm => 25.4 / 72;
38
use constant mm => 25.4 / 72;
(-)a/Koha/pdfformat/layout3pages.pm (-8 / +7 lines)
Lines 21-29 package Koha::pdfformat::layout3pages; Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
#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
BEGIN {
28
    our @EXPORT = qw(printpdf);
29
}
30
27
use utf8;
31
use utf8;
28
32
29
use C4::Acquisition qw( get_rounded_price );
33
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 );
35
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Libraries;
36
use Koha::Libraries;
33
37
34
BEGIN {
38
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
39
41
#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).
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.
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.
(-)a/Koha/pdfformat/layout3pagesfr.pm (-9 / +6 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
BEGIN {
27
    our @EXPORT = qw(printpdf);
28
}
29
25
use MIME::Base64;
30
use MIME::Base64;
26
use List::MoreUtils qw( uniq );
31
use List::MoreUtils qw( uniq );
27
use Modern::Perl;
28
use utf8;
32
use utf8;
29
33
30
use C4::Acquisition;
34
use C4::Acquisition;
Lines 32-44 use Koha::Number::Price; Link Here
32
use Koha::DateUtils qw( dt_from_string output_pref );
36
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::Libraries;
37
use Koha::Libraries;
34
38
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).
39
#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.
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.
44
use constant mm => 25.4 / 72;
41
use constant mm => 25.4 / 72;
(-)a/misc/translator/VerboseWarnings.pm (-24 / +11 lines)
Lines 1-8 Link Here
1
package VerboseWarnings;
1
package VerboseWarnings;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
use base 'Exporter';
5
###############################################################################
5
BEGIN {
6
    our @EXPORT_OK = qw(
7
        pedantic_p
8
        warn_additional
9
        warn_normal
10
        warn_pedantic
11
        error_additional
12
        error_normal
13
    );
14
}
6
15
7
=head1 NAME
16
=head1 NAME
8
17
Lines 15-39 verbose warnings. Link Here
15
24
16
=cut
25
=cut
17
26
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);
27
use vars qw( $appName $input $input_abbr $pedantic_p $pedantic_tag $quiet);
38
use vars qw( $warned $erred );
28
use vars qw( $warned $erred );
39
29
Lines 123-127 sub warned { Link Here
123
}
113
}
124
114
125
1;
115
1;
126
127
###############################################################################
128
- 

Return to bug 40680