aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-12-14 17:45:42 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-12-15 00:11:06 +0000
commitda29e8a75eaa92e98807ad89d29d3d1f3c01bc14 (patch)
treeaed044b4e4fa1fb0cf7d0e3274d8e15973089bd2 /perllib/FixMyStreet/Cobrand/FiksGataMi.pm
parentac71de34b015176b44d35c83cf5e4a838ed75723 (diff)
Migrate Reports.pm to use bodies, not areas.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/FiksGataMi.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/FiksGataMi.pm15
1 files changed, 4 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
index 13dded839..5e90db038 100644
--- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
+++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm
@@ -109,24 +109,17 @@ sub remove_redundant_areas {
if $all_areas->{3};
}
-sub filter_all_council_ids_list {
- my $self = shift;
- my @all_councils_ids = @_;
-
- # as above we only want to show Oslo once
- return grep { $_ != 301 } @all_councils_ids;
-}
-
sub short_name {
my $self = shift;
my ($area, $info) = @_;
- if ($area->{name} =~ /^(Os|Nes|V\xe5ler|Sande|B\xf8|Her\xf8y)$/) {
+ my $name = $area->{name} || $area->name;
+
+ if ($name =~ /^(Os|Nes|V\xe5ler|Sande|B\xf8|Her\xf8y)$/) {
my $parent = $info->{$area->{parent_area}}->{name};
- return URI::Escape::uri_escape_utf8("$area->{name}, $parent");
+ return URI::Escape::uri_escape_utf8("$name, $parent");
}
- my $name = $area->{name};
$name =~ s/ & / and /;
$name = URI::Escape::uri_escape_utf8($name);
$name =~ s/%20/+/g;