aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/TfL.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm
index 5c08cb540..1fa0aabe0 100644
--- a/perllib/FixMyStreet/Cobrand/TfL.pm
+++ b/perllib/FixMyStreet/Cobrand/TfL.pm
@@ -22,6 +22,19 @@ sub council_url { return 'tfl'; }
sub area_types { [ 'LBO' ] }
sub is_council { 0 }
+sub borough_for_report {
+ my ($self, $problem) = @_;
+
+ # Get relevant area ID from report
+ my %areas = map { $_ => 1 } split ',', $problem->areas;
+ my ($council_match) = grep { $areas{$_} } @{ $self->council_area_id };
+ return unless $council_match;
+
+ # Look up area names if not already fetched
+ my $areas = $self->{c}->stash->{children} ||= $self->fetch_area_children;
+ return $areas->{$council_match}{name};
+}
+
sub abuse_reports_only { 1 }
sub send_questionnaires { 0 }