Bugzilla – Attachment 30124 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]
[PASSED QA] Bug 11230: dereference hashes in keys (QA followup)
PASSED-QA-Bug-11230-dereference-hashes-in-keys-QA-.patch (text/plain), 1.69 KB, created by
Kyle M Hall
on 2014-07-25 14:40:02 UTC
(
hide
)
Description:
[PASSED QA] Bug 11230: dereference hashes in keys (QA followup)
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2014-07-25 14:40:02 UTC
Size:
1.69 KB
patch
obsolete
>From 7f8da434f1724d5a3ef45cebd087b222471ebb64 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathsabypro@gmail.com> >Date: Mon, 14 Jul 2014 00:15:04 +0200 >Subject: [PATCH] [PASSED QA] Bug 11230: dereference hashes in keys (QA followup) > >This followup replaces $params with %$params in keys function >It also fixes some wording > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Stats.pm | 8 ++++---- > 1 files 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.2.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