aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-07-01 17:04:13 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-07-01 17:04:13 +0100
commit904737fa294df86a88c3315c34af161ab1528142 (patch)
tree53599689f46bb3e7bbc5c76c20f5811511ebcf80
parent5df9b993035acdf8160d4c0bd83ff6091cd50cf7 (diff)
Don't fetch unnecessary rows (due to missing commas).
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 61218448b..4762e6f07 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -288,9 +288,9 @@ sub load_and_group_problems : Private {
state => [ 'confirmed', 'fixed' ]
};
if ($c->stash->{ward}) {
- $where->{areas} = { 'like', '%' . $c->stash->{ward}->{id} . '%' }; # FIXME Check this is secure
+ $where->{areas} = { 'like', '%,' . $c->stash->{ward}->{id} . ',%' };
} elsif ($c->stash->{council}) {
- $where->{areas} = { 'like', '%' . $c->stash->{council}->{id} . '%' };
+ $where->{areas} = { 'like', '%,' . $c->stash->{council}->{id} . ',%' };
}
my $problems = $c->cobrand->problems->search(
$where,