diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-04-13 14:29:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-04-13 14:35:58 +0100 |
commit | 112ab20142f7f79d4ffff557b95c53406ad79bd9 (patch) | |
tree | 20f32e6faa1449c6345a8ffeb428dfc440cfddee /perllib/FixMyStreet/App/Controller/Reports.pm | |
parent | cfe97d706f5cb7b3f3ca6d9227a872a7e50d97b2 (diff) |
Fix issue with categories with regex characters.
As the templates were using `grep`, they failed to match on a category
such as "Footpaths (right of way)". Changing the stash variables to be
hashes instead of lists makes checking for a key simpler. Fixes #1688.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 69a2ddb0f..bb5b13b61 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -137,7 +137,7 @@ sub ward : Path : Args(2) { } )->all; @categories = map { $_->category } @categories; $c->stash->{filter_categories} = \@categories; - $c->stash->{filter_category} = [ $c->get_param_list('filter_category', 1) ]; + $c->stash->{filter_category} = { map { $_ => 1 } $c->get_param_list('filter_category', 1) }; my $pins = $c->stash->{pins}; |