aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-10-11 11:40:20 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-10-11 16:35:10 +0100
commit14bf4d2556c64dbdbed9fb60a0a9f4b27a234203 (patch)
tree14f83ddc475b68525130bbb2b77e70ee3273cb11 /perllib
parentc6764326687a9416c5d950ebf58456caf8ba37da (diff)
Use cobrand for children area types, not UK specific array.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm6
2 files changed, 3 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index e4266dc64..a5ba8ff07 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -96,7 +96,7 @@ sub index : Path : Args(0) {
$c->stash->{council} = $council_detail;
my $children = mySociety::MaPit::call('area/children', $council,
- type => $mySociety::VotingArea::council_child_types,
+ type => $c->cobrand->area_types_children,
);
$c->stash->{children} = $children;
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) {