[Koha-bugs] [Bug 15504] Track Patron's Last Activity

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 9 15:24:44 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15504

--- Comment #82 from Andrii Nugged <nugged at gmail.com> ---
QA-question:

This sub:

    sub update_lastseen {
        my ( $self, $activity ) = @_;
        return $self if !C4::Context->preference('TrackLastPatronActivity');

        my $tracked_activities = {
            map { ( lc $_, 1 ); } split /\s*\,\s*/,
            C4::Context->preference('TrackLastPatronActivityTriggers')
        };
        return $self unless $tracked_activities->{$activity};

        ...

is called very often (on each Auth-request, for each borrower, so each page
load or whatever happens, then for every other event).

Is that "split" of static variable from
preference('TrackLastPatronActivityTriggers') justified to be called that way
EVERY time, splitting again and again?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list