Bugzilla – Attachment 41266 Details for
Bug 14627
GetAuthorisedValueByCode does not handle undef intelligently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-14627-Check-for-undef-passed-to-GetAuthorisedVal.patch (text/plain), 982 bytes, created by
Colin Campbell
on 2015-07-31 14:14:54 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2015-07-31 14:14:54 UTC
Size:
982 bytes
patch
obsolete
>From 6a5305e8eecba2c995efe011eef56347991ef3af Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Fri, 31 Jul 2015 15:05:27 +0100 >Subject: [PATCH] Bug 14627 Check for undef passed to GetAuthorisedValueByCode > >Dont prepare or execute unnecessary sql if passed an undef value >routine is used in various places that dont check if the value >returned from a nullable field is defined or not >(e.g. streettype in the borrower record which many sites do not use) > >Lets save those cpu cycles for something useful >--- > C4/Koha.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index bca12d6..910d6bb 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -1257,6 +1257,9 @@ by the passed category and code > > sub GetAuthorisedValueByCode { > my ( $category, $authvalcode, $opac ) = @_; >+ if (!defined $authvalcode) { >+ return; >+ } > > my $field = $opac ? 'lib_opac' : 'lib'; > my $dbh = C4::Context->dbh; >-- >2.4.3 >
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 14627
:
41266
|
43090
|
43091
|
44263
|
44264