aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-24 20:55:06 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-25 12:45:05 +0100
commit190866a9a10a1b4a90b2426396d9710c4ee54f60 (patch)
tree7971297bb079328149ced1214471746aa3e200b8 /perllib
parent6f7efae58ef30ffbaddd42b4ac7f65380f6fe68a (diff)
[Zurich] Move Zurich specific setup to its cobrand.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App.pm6
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm5
2 files changed, 6 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 2365118ea..b7bbc8a0a 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -219,11 +219,7 @@ sub setup_request {
mySociety::MaPit::configure( "http://$host/fakemapit/" );
}
- # XXX Put in cobrand / do properly
- if ($c->cobrand->moniker eq 'zurich') {
- FixMyStreet::DB::Result::Problem->visible_states_add('unconfirmed');
- FixMyStreet::DB::Result::Problem->visible_states_remove('investigating');
- }
+ $c->cobrand->call_hook('setup_states');
if (FixMyStreet->test_mode) {
# Is there a better way of altering $c->config that may have
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index c56f595ca..de4a5262a 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -54,6 +54,11 @@ you already have, and the countres set so that they shouldn't in future.
=cut
+sub setup_states {
+ FixMyStreet::DB::Result::Problem->visible_states_add('unconfirmed');
+ FixMyStreet::DB::Result::Problem->visible_states_remove('investigating');
+}
+
sub shorten_recency_if_new_greater_than_fixed {
return 0;
}