diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 14 |
2 files changed, 19 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 07bea276c..a9df1aeb7 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -44,6 +44,10 @@ __PACKAGE__->add_columns( { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "external_url", { data_type => "text", is_nullable => 1 }, + "fetch_problems", + { data_type => "boolean", default_value => \"false", is_nullable => 0 }, + "blank_updates_permitted", + { data_type => "boolean", default_value => \"false", is_nullable => 0 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( @@ -118,8 +122,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2017-02-13 15:11:11 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BOJANVwg3kR/1VjDq0LykA +# Created by DBIx::Class::Schema::Loader v0.07035 @ 2018-03-01 12:27:28 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dzqgZI1wkGDPS2PfJgDEIg use Moo; use namespace::clean; 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. |