aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-09 12:58:26 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-09 12:58:26 +0100
commit717a87caaeab4d76f30359360be9c620edab0abb (patch)
tree6b527ea4b7fc91d2e465983222fde8df56378b9a /perllib/FixMyStreet/Cobrand
parentd01b9bc2e42e46d5415a5464eb2ee063f43a8464 (diff)
move remove redundant council code into cobrands
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm21
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm9
2 files changed, 30 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index e3a1aa8ee..260be07a5 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -590,5 +590,26 @@ sub email_host {
&& "http://$email_vhost" eq mySociety::Config::get("BASE_URL");
}
+=item remove_redundant_councils
+
+Remove councils whose reports go to another council
+
+=cut
+
+sub remove_redundant_councils {
+ my $self = shift;
+ my $all_councils = shift;
+
+ # Ipswich & St Edmundsbury are responsible for everything in their
+ # areas, not Suffolk
+ delete $all_councils->{2241}
+ if $all_councils->{2446} #
+ || $all_councils->{2443};
+
+ # Norwich is responsible for everything in its areas, not Norfolk
+ delete $all_councils->{2233} #
+ if $all_councils->{2391};
+}
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 1b9a1fab7..d733ba8f0 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -51,4 +51,13 @@ sub geocoded_string_check {
return 0;
}
+sub remove_redundant_councils {
+ my $self = shift;
+ my $all_councils = shift;
+
+ # Oslo is both a kommune and a fylke, we only want to show it once
+ delete $all_councils->{301} #
+ if $all_councils->{3};
+}
+
1;