aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm6
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/State.pm4
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm5
3 files changed, 12 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 99c5b6dab..bac183271 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -278,7 +278,11 @@ sub problem_state_display {
return '' unless $state;
my $cobrand_name = $c->cobrand->moniker;
- $cobrand_name = 'bromley' if $self->problem->to_body_named('Bromley');
+ my $names = join(',,', @{$self->problem->body_names});
+ if ($names =~ /(Bromley|Isle of Wight|TfL)/) {
+ ($cobrand_name = lc $1) =~ s/ //g;
+ }
+
return FixMyStreet::DB->resultset("State")->display($state, 1, $cobrand_name);
}
diff --git a/perllib/FixMyStreet/DB/ResultSet/State.pm b/perllib/FixMyStreet/DB/ResultSet/State.pm
index cb894005f..4f98efbf2 100644
--- a/perllib/FixMyStreet/DB/ResultSet/State.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/State.pm
@@ -1,6 +1,7 @@
package FixMyStreet::DB::ResultSet::State;
use base 'DBIx::Class::ResultSet';
+use utf8;
use strict;
use warnings;
use Memcached;
@@ -74,7 +75,8 @@ sub display {
return $unchanging->{$label} if $unchanging->{$label};
if ($cobrand && $label eq 'not responsible') {
return 'third party responsibility' if $cobrand eq 'bromley';
- return "not Island Roads' responsibility" if $cobrand eq 'isleofwight';
+ return "not Island Roads’ responsibility" if $cobrand eq 'isleofwight';
+ return "not TfL’s responsibility" if $cobrand eq 'tfl';
return _("not the council's responsibility");
}
if ($cobrand && $cobrand eq 'oxfordshire' && $label eq 'unable to fix') {
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 80b60b381..ffff43472 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -106,7 +106,10 @@ sub send {
}
my $result = FixMyStreet::Email::send_cron($row->result_source->schema,
- $self->get_template($row), $h,
+ $self->get_template($row), {
+ %$h,
+ cobrand => $cobrand, # For correct logo that uses cobrand object
+ },
$params, $sender, $nomail, $cobrand, $row->lang);
unless ($result) {