diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-10-11 11:40:20 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-10-11 16:35:10 +0100 |
commit | 14bf4d2556c64dbdbed9fb60a0a9f4b27a234203 (patch) | |
tree | 14f83ddc475b68525130bbb2b77e70ee3273cb11 /perllib/FixMyStreet/App/Controller/Reports.pm | |
parent | c6764326687a9416c5d950ebf58456caf8ba37da (diff) |
Use cobrand for children area types, not UK specific array.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 444389ec2..859f294da 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -6,7 +6,6 @@ use File::Slurp; use List::MoreUtils qw(zip); use POSIX qw(strcoll); use mySociety::MaPit; -use mySociety::VotingArea; BEGIN { extends 'Catalyst::Controller'; } @@ -135,7 +134,7 @@ sub ward : Path : Args(2) { # List of wards unless ($c->stash->{ward}) { my $children = mySociety::MaPit::call('area/children', [ $c->stash->{council}->{id} ], - type => $mySociety::VotingArea::council_child_types, + type => $c->cobrand->area_types_children, ); foreach (values %$children) { $_->{url} = $c->uri_for( $c->stash->{council_url} @@ -251,7 +250,6 @@ sub council_check : Private { This action checks the ward name from a URI exists and is part of the right parent, already found with council_check. It either stores the ward Area if okay, or redirects to the council page if bad. -This is currently only used in the UK, hence the use of mySociety::VotingArea. =cut @@ -265,7 +263,7 @@ sub ward_check : Private { my $council = $c->stash->{council}; my $qw = mySociety::MaPit::call('areas', $ward, - type => $mySociety::VotingArea::council_child_types, + type => $c->cobrand->area_types_children, min_generation => $c->cobrand->area_min_generation ); foreach my $area (sort { $a->{name} cmp $b->{name} } values %$qw) { |