Bugzilla – Attachment 52219 Details for
Bug 16443
C4::Members::Statistics is not plack safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16443: Make C4::Members::Statistics plack safe
Bug-16443-Make-C4MembersStatistics-plack-safe.patch (text/plain), 1.34 KB, created by
Marcel de Rooy
on 2016-06-10 10:05:51 UTC
(
hide
)
Description:
Bug 16443: Make C4::Members::Statistics plack safe
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-06-10 10:05:51 UTC
Size:
1.34 KB
patch
obsolete
>From 57d5062f6506112e3680856d8cc0994ea9a8a03f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 May 2016 20:08:53 +0100 >Subject: [PATCH] Bug 16443: Make C4::Members::Statistics plack safe >Content-Type: text/plain; charset=utf-8 > >If the prefs is updated, the fields won't be. >To make sure we already fetch updated values, we should remove the >package variable and define it in the subroutine. > >There is not test plan, just make sure the changes are consistent. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Members/Statistics.pm | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > >diff --git a/C4/Members/Statistics.pm b/C4/Members/Statistics.pm >index b8b3a0f..23771c1 100644 >--- a/C4/Members/Statistics.pm >+++ b/C4/Members/Statistics.pm >@@ -40,10 +40,6 @@ BEGIN { > ); > } > >- >-our $fields = get_fields(); >- >- > =head2 get_fields > Get fields form syspref 'StatisticsFields' > Returns list of valid fields, defaults to 'location|itype|ccode' >@@ -79,6 +75,7 @@ sub get_fields { > sub construct_query { > my $count = shift; > my $subquery = shift; >+ my $fields = get_fields(); > my @select_fields = split '\|', $fields; > my $query = "SELECT COUNT(*) as count_$count,"; > $query .= join ',', @select_fields; >-- >1.7.10.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 16443
:
51220
|
51322
| 52219 |
52220