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

(-)a/Koha/AuthorisedValue.pm (-5 / +3 lines)
Lines 131-141 sub replace_branch_limitations { Link Here
131
    return \@return_values;
131
    return \@return_values;
132
}
132
}
133
133
134
=head3 lib_opac
134
=head3 opac_description
135
135
136
my $description = $av->lib_opac();
136
my $description = $av->opac_description();
137
138
$av->lib_opac( $description );
139
137
140
=cut
138
=cut
141
139
Lines 145-151 sub opac_description { Link Here
145
    return $self->lib_opac() || $self->lib();
143
    return $self->lib_opac() || $self->lib();
146
}
144
}
147
145
148
=head3 Koha::Objects->_avb_resultset
146
=head3 _avb_resultset
149
147
150
Returns the internal resultset or creates it if undefined
148
Returns the internal resultset or creates it if undefined
151
149
(-)a/Koha/Cache.pm (-10 / +3 lines)
Lines 27-32 Koha::Cache - Handling caching of html and Objects for Koha Link Here
27
  use Koha::Cache;
27
  use Koha::Cache;
28
  my $cache = Koha::Cache->new({cache_type => $cache_type, %params});
28
  my $cache = Koha::Cache->new({cache_type => $cache_type, %params});
29
29
30
  # see also Koha::Caches->get_instance;
31
30
=head1 DESCRIPTION
32
=head1 DESCRIPTION
31
33
32
Koha caching routines. This class provides two interfaces for cache access.
34
Koha caching routines. This class provides two interfaces for cache access.
Lines 35-40 The first, traditional OO interface provides the following functions: Link Here
35
=head1 FUNCTIONS
37
=head1 FUNCTIONS
36
38
37
=cut
39
=cut
40
38
use strict;
41
use strict;
39
use warnings;
42
use warnings;
40
use Carp;
43
use Carp;
Lines 54-69 our %L1_cache; Link Here
54
our $L1_encoder = Sereal::Encoder->new;
57
our $L1_encoder = Sereal::Encoder->new;
55
our $L1_decoder = Sereal::Decoder->new;
58
our $L1_decoder = Sereal::Decoder->new;
56
59
57
=head2 get_instance
58
59
    my $cache = Koha::Caches->get_instance();
60
61
This gets a shared instance of the cache, set up in a very default way. This is
62
the recommended way to fetch a cache object. If possible, it'll be
63
persistent across multiple instances.
64
65
=cut
66
67
=head2 new
60
=head2 new
68
61
69
Create a new Koha::Cache object. This is required for all cache-related functionality.
62
Create a new Koha::Cache object. This is required for all cache-related functionality.
(-)a/Koha/Caches.pm (+29 lines)
Lines 15-25 package Koha::Caches; Link Here
15
# You should have received a copy of the GNU General Public License
15
# You should have received a copy of the GNU General Public License
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
=head1 NAME
19
20
Koha::Caches - Cache handling
21
22
=head1 SYNOPSIS
23
24
my $cache = Koha::Caches->get_instance();
25
26
=head1 DESCRIPTION
27
28
Description
29
30
=head1 CLASS METHODS
31
32
=cut
33
18
use Modern::Perl;
34
use Modern::Perl;
19
35
20
use Koha::Cache;
36
use Koha::Cache;
21
37
22
our $singleton_caches;
38
our $singleton_caches;
39
40
=head2 get_instance
41
42
This gets a shared instance of the cache, set up in a very default way. This is
43
the recommended way to fetch a cache object. If possible, it'll be
44
persistent across multiple instances.
45
46
=cut
47
23
sub get_instance {
48
sub get_instance {
24
    my ($class, $subnamespace) = @_;
49
    my ($class, $subnamespace) = @_;
25
    $subnamespace //= '';
50
    $subnamespace //= '';
Lines 28-33 sub get_instance { Link Here
28
    return $singleton_caches->{$subnamespace};
53
    return $singleton_caches->{$subnamespace};
29
}
54
}
30
55
56
=head2 flush_L1_caches
57
58
=cut
59
31
sub flush_L1_caches {
60
sub flush_L1_caches {
32
    return unless $singleton_caches;
61
    return unless $singleton_caches;
33
    for my $cache ( values %$singleton_caches ) {
62
    for my $cache ( values %$singleton_caches ) {
(-)a/Koha/Patron.pm (-7 / +7 lines)
Lines 264-270 sub do_check_for_previous_checkout { Link Here
264
    return $old_issues->count;  # 0 || N
264
    return $old_issues->count;  # 0 || N
265
}
265
}
266
266
267
=head2 is_debarred
267
=head3 is_debarred
268
268
269
my $debarment_expiration = $patron->is_debarred;
269
my $debarment_expiration = $patron->is_debarred;
270
270
Lines 283-289 sub is_debarred { Link Here
283
    return;
283
    return;
284
}
284
}
285
285
286
=head2 is_expired
286
=head3 is_expired
287
287
288
my $is_expired = $patron->is_expired;
288
my $is_expired = $patron->is_expired;
289
289
Lines 299-305 sub is_expired { Link Here
299
    return 0;
299
    return 0;
300
}
300
}
301
301
302
=head2 is_going_to_expire
302
=head3 is_going_to_expire
303
303
304
my $is_going_to_expire = $patron->is_going_to_expire;
304
my $is_going_to_expire = $patron->is_going_to_expire;
305
305
Lines 319-325 sub is_going_to_expire { Link Here
319
    return 0;
319
    return 0;
320
}
320
}
321
321
322
=head2 update_password
322
=head3 update_password
323
323
324
my $updated = $patron->update_password( $userid, $password );
324
my $updated = $patron->update_password( $userid, $password );
325
325
Lines 367-373 sub renew_account { Link Here
367
    return dt_from_string( $expiry_date )->truncate( to => 'day' );
367
    return dt_from_string( $expiry_date )->truncate( to => 'day' );
368
}
368
}
369
369
370
=head2 has_overdues
370
=head3 has_overdues
371
371
372
my $has_overdues = $patron->has_overdues;
372
my $has_overdues = $patron->has_overdues;
373
373
Lines 381-387 sub has_overdues { Link Here
381
    return $self->_result->issues->search({ date_due => { '<' => $dtf->format_datetime( dt_from_string() ) } })->count;
381
    return $self->_result->issues->search({ date_due => { '<' => $dtf->format_datetime( dt_from_string() ) } })->count;
382
}
382
}
383
383
384
=head2 track_login
384
=head3 track_login
385
385
386
    $patron->track_login;
386
    $patron->track_login;
387
    $patron->track_login({ force => 1 });
387
    $patron->track_login({ force => 1 });
Lines 400-406 sub track_login { Link Here
400
    $self->lastseen( dt_from_string() )->store;
400
    $self->lastseen( dt_from_string() )->store;
401
}
401
}
402
402
403
=head2 move_to_deleted
403
=head3 move_to_deleted
404
404
405
my $is_moved = $patron->move_to_deleted;
405
my $is_moved = $patron->move_to_deleted;
406
406
(-)a/Koha/Plugins.pm (-1 / +1 lines)
Lines 54-60 sub new { Link Here
54
This will return a list of all available plugins, optionally limited by
54
This will return a list of all available plugins, optionally limited by
55
method or metadata value.
55
method or metadata value.
56
56
57
    my @plugins = C4::Plugins::GetPlugins({
57
    my @plugins = Koha::Plugins::GetPlugins({
58
        method => 'some_method',
58
        method => 'some_method',
59
        metadata => { some_key => 'some_value' },
59
        metadata => { some_key => 'some_value' },
60
    });
60
    });
(-)a/misc/migration_tools/rebuild_zebra.pl (-2 / +2 lines)
Lines 179-186 my $marcxml_close = q{ Link Here
179
};
179
};
180
180
181
# Protect again simultaneous update of the zebra index by using a lock file.
181
# Protect again simultaneous update of the zebra index by using a lock file.
182
# Create our own lock directory if its missing.  This shouild be created
182
# Create our own lock directory if it is missing. This should be created
183
# by koha-zebra-ctl.sh or at system installation.  If the desired directory
183
# by koha-zebra-ctl.sh or at system installation. If the desired directory
184
# does not exist and cannot be created, we fall back on /tmp - which will
184
# does not exist and cannot be created, we fall back on /tmp - which will
185
# always work.
185
# always work.
186
186
(-)a/reports/reserves_stats.pl (-1 / +1 lines)
Lines 41-47 use YAML; Link Here
41
41
42
=head1 DESCRIPTION
42
=head1 DESCRIPTION
43
43
44
    Plugin that shows circulation stats
44
    Plugin that shows reserve stats
45
45
46
=cut
46
=cut
47
47
(-)a/t/db_dependent/Koha/Authorities.t (-2 / +1 lines)
Lines 49-55 is( Koha::Authority::Types->search->count, $nb_of_authority_types + 1, 'The auth Link Here
49
is( Koha::Authorities->search->count,      $nb_of_authorities + 2,     'The 2 authorities should have been added' );
49
is( Koha::Authorities->search->count,      $nb_of_authorities + 2,     'The 2 authorities should have been added' );
50
50
51
$new_authority_1->delete;
51
$new_authority_1->delete;
52
is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the library' );
52
is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the authority' );
53
53
54
$schema->storage->txn_rollback;
54
$schema->storage->txn_rollback;
55
1;
55
1;
56
- 

Return to bug 17935