Bugzilla – Attachment 29666 Details for
Bug 11230
Refactor C4::Stats::UpdateStats and add UT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH 2/2] Bug 11230: dereference hashes in keys (QA followup)
0002-QAfollowup.patch (text/plain), 1.67 KB, created by
Mathieu Saby
on 2014-07-13 22:18:38 UTC
(
hide
)
Description:
[PATCH 2/2] Bug 11230: dereference hashes in keys (QA followup)
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2014-07-13 22:18:38 UTC
Size:
1.67 KB
patch
obsolete
>From 80c84834d3ad172e34dacbc95a1d82f4a91640a7 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathsabypro@gmail.com> >Date: Mon, 14 Jul 2014 00:15:04 +0200 >Subject: [PATCH 2/2] Bug 11230: dereference hashes in keys (QA followup) >Content-Type: text/plain; charset="utf-8" > >This followup replaces $params with %$params in keys function >It also fixes some wording > >--- > C4/Stats.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Stats.pm b/C4/Stats.pm >index 078595d..a1098ae 100644 >--- a/C4/Stats.pm >+++ b/C4/Stats.pm >@@ -94,7 +94,7 @@ sub UpdateStats { > > my @mandatory_keys = (); > if (! exists $params->{type} or ! defined $params->{type}) { >- croak ("UpdateStats does not received type param"); >+ croak ("UpdateStats did not received type param"); > } > if (grep ($_ eq $params->{type}, @allowed_circulation_types )) { > @mandatory_keys = @circulation_mandatory_keys; >@@ -105,13 +105,13 @@ sub UpdateStats { > } > my @missing_params = (); > for my $mykey (@mandatory_keys ) { >- push @missing_params, $mykey if !grep (/^$mykey/, keys $params); >+ push @missing_params, $mykey if !grep (/^$mykey/, keys %$params); > } > if (scalar @missing_params > 0 ) { >- croak ("UpdateStats does not received mandatory param(s): ".join (", ",@missing_params )); >+ croak ("UpdateStats did not received mandatory param(s): ".join (", ",@missing_params )); > } > my @invalid_params = (); >- for my $myparam (keys $params ) { >+ for my $myparam (keys %$params ) { > push @invalid_params, $myparam unless grep (/^$myparam$/, @allowed_keys); > } > if (scalar @invalid_params > 0 ) { >-- >1.7.9.5 >
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 11230
:
22850
|
26798
|
29158
|
29666
|
30123
|
30124