diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bromley.pm | 10 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 18 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm | 3 |
3 files changed, 26 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index f65c2c258..38c115e1a 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -48,10 +48,12 @@ sub recent_photos { return $self->problems->recent_photos( $num, $lat, $lon, $dist ); } -sub pin_colour { - my ( $self, $p ) = @_; - #return 'green' if time() - $p->confirmed_local->epoch < 7 * 24 * 60 * 60; - return 'yellow'; +sub send_questionnaires { + return 0; +} + +sub ask_ever_reported { + return 0; } 1; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index eb37b062a..76113d273 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -577,6 +577,14 @@ first time they' ve reported a problem sub ask_ever_reported { 1 } +=head2 send_questionnaires + +Return a boolean indicating whether people should be sent questionnaire emails. + +=cut + +sub send_questionnaires { 1 } + =head2 admin_pages List of names of pages to display on the admin interface @@ -927,8 +935,16 @@ sub example_places { sub process_extras {} +=head 2 pin_colour + +Returns the colour of pin to be used for a particular report +(so perhaps different depending upon the age of the report). + +=cut sub pin_colour { - 'yellow'; + my ( $self, $p ) = @_; + #return 'green' if time() - $p->confirmed_local->epoch < 7 * 24 * 60 * 60; + return 'yellow'; } 1; diff --git a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm index 0cf01b6d1..753eb2084 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Questionnaire.pm @@ -48,6 +48,9 @@ sub send_questionnaires_period { my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($row->cobrand)->new(); $cobrand->set_lang_and_domain($row->lang, 1); + # Not all cobrands send questionnaires + next unless $cobrand->send_questionnaires; + # Cobranded and non-cobranded messages can share a database. In this case, the conf file # should specify a vhost to send the reports for each cobrand, so that they don't get sent # more than once if there are multiple vhosts running off the same database. The email_host |