aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index c73f7efca..2deeb3084 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -341,7 +341,7 @@ around service => sub {
sub title_safe {
my $self = shift;
- return _('Awaiting moderation') if $self->cobrand eq 'zurich' && $self->state eq 'unconfirmed';
+ return _('Awaiting moderation') if $self->cobrand eq 'zurich' && $self->state eq 'submitted';
return $self->title;
}
@@ -509,6 +509,18 @@ sub tokenised_url {
return "/M/". $token->token;
}
+=head2 is_hidden
+
+Returns 1 if the problem is in an hidden state otherwise 0.
+
+=cut
+
+sub is_hidden {
+ my $self = shift;
+
+ return exists $self->hidden_states->{ $self->state } ? 1 : 0;
+}
+
=head2 is_open
Returns 1 if the problem is in a open state otherwise 0.