aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Reports.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-09-21 11:41:23 +0100
committerStruan Donald <struan@exo.org.uk>2011-09-21 11:41:23 +0100
commitd941a8c26e943c941f8e37ecbd9a9982dd41cb70 (patch)
tree75ea20fb18e984912ba60e4e499114c83cf431fe /perllib/FixMyStreet/App/Controller/Reports.pm
parent9da2d7b0e806407e3ed5e5418a53fca64757a39a (diff)
parent77f31e8c96c727ea5ab9cf217cfd924074e8f3ed (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into js-validation
Conflicts: templates/web/default/report/display.html
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index f7fb5dec5..93af3393c 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -319,8 +319,20 @@ sub load_and_group_problems : Private {
};
if ($c->stash->{ward}) {
$where->{areas} = { 'like', '%,' . $c->stash->{ward}->{id} . ',%' };
+ $where->{council} = [
+ undef,
+ $c->stash->{council}->{id},
+ { 'like', $c->stash->{council}->{id} . ',%' },
+ { 'like', '%,' . $c->stash->{council}->{id} },
+ ];
} elsif ($c->stash->{council}) {
$where->{areas} = { 'like', '%,' . $c->stash->{council}->{id} . ',%' };
+ $where->{council} = [
+ undef,
+ $c->stash->{council}->{id},
+ { 'like', $c->stash->{council}->{id} . ',%' },
+ { 'like', '%,' . $c->stash->{council}->{id} },
+ ];
}
my $problems = $c->cobrand->problems->search(
$where,