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

(-)a/Koha/Old/Checkouts.pm (-1 / +4 lines)
Lines 96-102 Anonymize the given I<Koha::Old::Checkouts> resultset. Link Here
96
sub anonymize {
96
sub anonymize {
97
    my ( $self, $params ) = @_;
97
    my ( $self, $params ) = @_;
98
98
99
    my $anonymous_id = C4::Context->preference('AnonymousPatron') || undef;
99
    my $anonymous_id = C4::Context->preference('AnonymousPatron');
100
101
    Koha::Exceptions::SysPref::NotSet->throw( syspref => 'AnonymousPatron' )
102
        unless $anonymous_id;
100
103
101
    return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } );
104
    return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } );
102
}
105
}
(-)a/Koha/Old/Hold.pm (-1 / +5 lines)
Lines 22-27 use Modern::Perl; Link Here
22
use base qw(Koha::Hold);
22
use base qw(Koha::Hold);
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::Exceptions::SysPref;
25
26
26
=head1 NAME
27
=head1 NAME
27
28
Lines 44-50 Anonymize the given I<Koha::Old::Hold> object. Link Here
44
sub anonymize {
45
sub anonymize {
45
    my ($self) = @_;
46
    my ($self) = @_;
46
47
47
    my $anonymous_id = C4::Context->preference('AnonymousPatron') || undef;
48
    my $anonymous_id = C4::Context->preference('AnonymousPatron');
49
50
    Koha::Exceptions::SysPref::NotSet->throw( syspref => 'AnonymousPatron' )
51
        unless $anonymous_id;
48
52
49
    return $self->update( { borrowernumber => $anonymous_id } );
53
    return $self->update( { borrowernumber => $anonymous_id } );
50
}
54
}
(-)a/Koha/Old/Holds.pm (-2 / +4 lines)
Lines 78-84 Anonymize the given I<Koha::Old::Holds> resultset. Link Here
78
sub anonymize {
78
sub anonymize {
79
    my ( $self, $params ) = @_;
79
    my ( $self, $params ) = @_;
80
80
81
    my $anonymous_id = C4::Context->preference('AnonymousPatron') || undef;
81
    my $anonymous_id = C4::Context->preference('AnonymousPatron');
82
83
    Koha::Exceptions::SysPref::NotSet->throw( syspref => 'AnonymousPatron' )
84
        unless $anonymous_id;
82
85
83
    return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } );
86
    return $self->update( { borrowernumber => $anonymous_id }, { no_triggers => 1 } );
84
}
87
}
85
- 

Return to bug 30007