aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm11
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/State.pm6
2 files changed, 8 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 562f29693..409a6e1ab 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -274,14 +274,9 @@ sub problem_state_display {
return FixMyStreet::DB->resultset("State")->display('confirmed', 1);
} elsif ($self->problem_state) {
my $state = $self->problem_state;
- if ($state eq 'not responsible') {
- $update_state = _( "not the council's responsibility" );
- if ($cobrand eq 'bromley' || $self->problem->to_body_named('Bromley')) {
- $update_state = 'third party responsibility';
- }
- } else {
- $update_state = FixMyStreet::DB->resultset("State")->display($state, 1);
- }
+ my $cobrand_name = $cobrand;
+ $cobrand_name = 'bromley' if $self->problem->to_body_named('Bromley');
+ $update_state = FixMyStreet::DB->resultset("State")->display($state, 1, $cobrand_name);
}
return $update_state;
diff --git a/perllib/FixMyStreet/DB/ResultSet/State.pm b/perllib/FixMyStreet/DB/ResultSet/State.pm
index de56c738c..3e6169aeb 100644
--- a/perllib/FixMyStreet/DB/ResultSet/State.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/State.pm
@@ -58,7 +58,7 @@ sub fixed { [ $_[0]->_filter(sub { $_->type eq 'fixed' }) ] }
# This function can be used to return that label's display name.
sub display {
- my ($rs, $label, $single_fixed) = @_;
+ my ($rs, $label, $single_fixed, $cobrand) = @_;
my $unchanging = {
unconfirmed => _("Unconfirmed"),
hidden => _("Hidden"),
@@ -72,6 +72,10 @@ sub display {
};
$label = 'fixed' if $single_fixed && $label =~ /^fixed - (council|user)$/;
return $unchanging->{$label} if $unchanging->{$label};
+ if ($cobrand && $label eq 'not responsible') {
+ return 'third party responsibility' if $cobrand eq 'bromley';
+ return _("not the council's responsibility");
+ }
my ($state) = $rs->_filter(sub { $_->label eq $label });
return $label unless $state;
$state->name($translate_now->{$label}) if $translate_now->{$label};