Bugzilla – Attachment 124654 Details for
Bug 28973
Improve Koha::Patron::can_see_patron_infos efficiency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency
Bug-28973-Improve-KohaPatroncanseepatroninfos-effi.patch (text/plain), 1.03 KB, created by
Kyle M Hall (khall)
on 2021-09-08 12:32:41 UTC
(
hide
)
Description:
Bug 28973: Improve Koha::Patron::can_see_patron_infos efficiency
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-09-08 12:32:41 UTC
Size:
1.03 KB
patch
obsolete
>From 7569bc5ee3a2f38f8ffeb425de20df10ae96314f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 8 Sep 2021 08:31:47 -0400 >Subject: [PATCH] Bug 28973: Improve Koha::Patron::can_see_patron_infos > efficiency > >The method can_see_patron_infos looks up a row in the branches table by branchcode just to get the branchcode it already has. This seems inefficient. > >Test Plan: >1) Apply this patch >2) No changes should be noted >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 941dace0df..71931b9e16 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1343,7 +1343,7 @@ Return true if the patron (usually the logged in user) can see the patron's info > sub can_see_patron_infos { > my ( $self, $patron ) = @_; > return unless $patron; >- return $self->can_see_patrons_from( $patron->library->branchcode ); >+ return $self->can_see_patrons_from( $patron->get_column('branchcode') ); > } > > =head3 can_see_patrons_from >-- >2.30.1 (Apple Git-130)
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 28973
:
124654
|
124656
|
127218