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

(-)a/Koha/Patron.pm (-6 / +10 lines)
Lines 1179-1191 sub update_lastseen { Link Here
1179
    my ( $self, $activity ) = @_;
1179
    my ( $self, $activity ) = @_;
1180
    return $self if !C4::Context->preference('TrackLastPatronActivity');
1180
    return $self if !C4::Context->preference('TrackLastPatronActivity');
1181
1181
1182
    my $tracked_activities = {
1182
    my $cache = Koha::Caches->get_instance();
1183
        map { ( lc $_, 1 ); } split /\s*\,\s*/,
1183
1184
        C4::Context->preference('TrackLastPatronActivityTriggers')
1184
    my $tracked_activities = $cache->get_from_cache('tracked_activities');
1185
    };
1185
    if ( !$tracked_activities ) {
1186
        $tracked_activities = {
1187
            map { ( lc $_, 1 ); } split /\s*\,\s*/,
1188
            C4::Context->preference('TrackLastPatronActivityTriggers')
1189
        };
1190
        $cache->set_in_cache( 'tracked_activities', $tracked_activities );
1191
    }
1186
    return $self unless $tracked_activities->{$activity};
1192
    return $self unless $tracked_activities->{$activity};
1187
1193
1188
    my $cache     = Koha::Caches->get_instance();
1189
    my $cache_key = "track_login_" . $self->userid;
1194
    my $cache_key = "track_login_" . $self->userid;
1190
    my $cached    = $cache->get_from_cache($cache_key);
1195
    my $cached    = $cache->get_from_cache($cache_key);
1191
    my $now       = dt_from_string();
1196
    my $now       = dt_from_string();
1192
- 

Return to bug 15504