diff options
-rw-r--r-- | conf/general.yml-example | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FiksGataMi.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixaMinGata.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 4 |
4 files changed, 11 insertions, 0 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example index 54bbd6a7f..3b2c597b9 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -46,6 +46,9 @@ STAGING_SITE: 1 # reports to live places. Set this to 1 if you want a dev site to route # reports as normal. SEND_REPORTS_ON_STAGING: 0 +# Manual testing of multiple cobrands can be made easier by skipping some +# checks they have in them, if this variable is set +SKIP_CHECKS_ON_STAGING: 0 # What to use as front page/alert example places placeholder # Defaults to High Street, Main Street diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm index ba26b7a2c..242735073 100644 --- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm +++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm @@ -29,6 +29,8 @@ sub disambiguate_location { } sub area_types { + my $self = shift; + return $self->next::method() if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); [ 'NKO', 'NFY', 'NRA' ]; } diff --git a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm index 9ffbf00b8..a321d5c7c 100644 --- a/perllib/FixMyStreet/Cobrand/FixaMinGata.pm +++ b/perllib/FixMyStreet/Cobrand/FixaMinGata.pm @@ -30,6 +30,8 @@ sub disambiguate_location { } sub area_types { + my $self = shift; + return $self->next::method() if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); [ 'KOM' ]; } diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 5d72c4962..42c9c5cbc 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -42,11 +42,13 @@ sub restriction { sub problems_restriction { my ($self, $rs) = @_; + return $rs if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); return $rs->to_body($self->council_id); } sub updates_restriction { my ($self, $rs) = @_; + return $rs if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); return $rs->to_body($self->council_id); } @@ -96,6 +98,8 @@ sub enter_postcode_text { sub area_check { my ( $self, $params, $context ) = @_; + return 1 if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); + my $councils = $params->{all_areas}; my $council_match = defined $councils->{$self->council_id}; if ($council_match) { |