aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-12 15:59:27 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-12 15:59:27 +0100
commit30bb1746b703a12d7ec3c698eea63ac9e1183037 (patch)
treeff645f19804c76b43012dda9b3e2d77f7ee1bf69 /perllib/FixMyStreet/DB/ResultSet
parent64f97d4cf9ad64905006e504f3ffb47fb373eca9 (diff)
mechanism to stop app store tests being sent
In order to allow the iOS app to be tested in the app store we need to allow the user to create a report but we don't want to send it. To allow this hide reports with a specific title during send_reports
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index 97d457297..b00daab40 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -259,10 +259,14 @@ sub send_reports {
}
$cobrand->set_lang_and_domain($row->lang, 1);
- if ( $row->is_from_abuser ) {
+ if ( $row->is_from_abuser) {
$row->update( { state => 'hidden' } );
debug_print("hiding because its sender is flagged as an abuser", $row->id) if $debug_mode;
next;
+ } elsif ( $row->title =~ /app store test/i ) {
+ $row->update( { state => 'hidden' } );
+ debug_print("hiding because it is an app store test message", $row->id) if $debug_mode;
+ next;
}
# Template variables for the email