Bugzilla – Attachment 73892 Details for
Bug 18821
TrackLastPatronActivity is a performance killer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18821: [DO NOT PUSH] Print STDERR Scaffolding
Bug-18821-DO-NOT-PUSH-Print-STDERR-Scaffolding.patch (text/plain), 2.21 KB, created by
Mark Tompsett
on 2018-04-09 19:25:49 UTC
(
hide
)
Description:
Bug 18821: [DO NOT PUSH] Print STDERR Scaffolding
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-04-09 19:25:49 UTC
Size:
2.21 KB
patch
obsolete
>From 26c031034a62e69d51b19a0a43f98feb864cf324 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 5 Apr 2018 16:58:33 +0000 >Subject: [PATCH] Bug 18821: [DO NOT PUSH] Print STDERR Scaffolding > >Tests must trigger all STDERRs added. >prove t/db_dependent/Members.t >prove t/db_dependent/Auth.t > >Patrons 3 and 4 not triggered. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Auth.pm | 3 +++ > Koha/Patron.pm | 5 +++++ > 2 files changed, 8 insertions(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 7a5b4e4..f182318 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -802,6 +802,7 @@ sub checkauth { > my $q_userid = $query->param('userid') // ''; > > my $session; >+ print STDERR "Auth 1\n"; > > # Basic authentication is incompatible with the use of Shibboleth, > # as Shibboleth may return REMOTE_USER as a Shibboleth attribute, >@@ -828,6 +829,7 @@ sub checkauth { > } > elsif ( $sessionID = $query->cookie("CGISESSID") ) > { # assignment, not comparison >+ print STDERR "Auth 2\n"; > $session = get_session($sessionID); > C4::Context->_new_userenv($sessionID); > my ( $ip, $lasttime, $sessiontype ); >@@ -1221,6 +1223,7 @@ sub checkauth { > if ( $userid ) { > # track_login also depends on pref TrackLastPatronActivity > my $patron = Koha::Patrons->find({ userid => $userid }); >+ print STDERR "Auth 3: $userid\n"; > $patron->track_login( { session => $session } ) if $patron; > } > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index fa02865..442cf03 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -404,15 +404,20 @@ sub has_overdues { > > sub track_login { > my ( $self, $params ) = @_; >+ print STDERR "Patron 1\n"; > my $session = $params->{session}; > > return unless C4::Context->preference('TrackLastPatronActivity') || $params->{force}; > >+ print STDERR "Patron 2\n"; > if ( $session ) { >+ print STDERR "Patron 3\n"; > return if $session->param('tracked_for_session') && !$params->{force}; >+ print STDERR "Patron 4\n"; > $session->param('tracked_for_session', 1); > } > >+ print STDERR "Patron 5\n"; > $self->lastseen( dt_from_string() )->store; > } > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18821
:
64425
|
64426
|
65687
|
73175
|
73706
|
73863
|
73891
|
73892
|
73893
|
75139
|
75288
|
75289
|
75427
|
75632
|
75633
|
75634
|
75635
|
75727
|
75728
|
75729
|
75733