From 485ac883cd1e119aeca2cbe77e5f02828496c28d Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 30 Aug 2013 19:31:24 +0100 Subject: Changed hardcoded URL in Problem.pm to be using variable from general.yml instead. --- perllib/FixMyStreet/DB/ResultSet/Problem.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm') diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 07848d782..97d457297 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -464,7 +464,8 @@ sub send_reports { send_fail_count => { '>', 0 } } ); while (my $row = $unsent->next) { - $sending_errors .= "* http://www.fixmystreet.com/report/" . $row->id . ", failed " + my $base_url = mySociety::Config::get('BASE_URL'); + $sending_errors .= "* " . $base_url . "/report/" . $row->id . ", failed " . $row->send_fail_count . " times, last at " . $row->send_fail_timestamp . ", reason " . $row->send_fail_reason . "\n"; } -- cgit v1.2.3 From 30bb1746b703a12d7ec3c698eea63ac9e1183037 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 12 Sep 2013 15:59:27 +0100 Subject: 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 --- perllib/FixMyStreet/DB/ResultSet/Problem.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm') 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 -- cgit v1.2.3