diff options
-rwxr-xr-x | bin/send-reports | 5 | ||||
-rw-r--r-- | templates/emails/submit-council | 5 | ||||
-rwxr-xr-x | web/index.cgi | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/bin/send-reports b/bin/send-reports index 638c55c33..988e8c4b3 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-reports,v 1.10 2007-02-06 10:32:04 matthew Exp $ +# $Id: send-reports,v 1.11 2007-02-07 09:56:15 matthew Exp $ use strict; require 5.8.0; @@ -69,6 +69,8 @@ foreach my $row (@$unsent) { $h{councils_name} = join(' and ', map { $areas_info->{$_}->{name} } @councils); $h{fuzzy} = $row->{used_map} ? 'To view a map of the precise location of this issue' : 'The user could not locate the problem on a map, but to see the area around the location they entered'; + $h{multiple} = @councils>1 ? "This email has been sent to both councils covering the location of the problem; please ignore it if you're not the correct council to deal with the issue.\n\n" + : ''; my $email = mySociety::Email::construct_email({ _template_ => $template, _parameters_ => \%h, @@ -76,6 +78,7 @@ foreach my $row (@$unsent) { To => \@to, 'Reply-To' => [ [ $row->{email}, $row->{name} ] ] }); + print $email if $nomail; my $result; if (mySociety::Config::get('STAGING_SITE') || $nomail) { diff --git a/templates/emails/submit-council b/templates/emails/submit-council index a12d45011..dfd8a33c8 100644 --- a/templates/emails/submit-council +++ b/templates/emails/submit-council @@ -2,9 +2,10 @@ Subject: Problem Report: <?=$values['title']?> Dear <?=$values['councils_name']?>, -A user of Neighbourhood Fix-It, <?=$values['user_details']?>, +<?=$values['multiple'?>A user +of Neighbourhood Fix-It, <?=$values['user_details']?>, has submitted the following report of a local problem that -they believe requires your attention: +they believe might require your attention: ---------- diff --git a/web/index.cgi b/web/index.cgi index 5fa895b90..7db407d2c 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.70 2007-02-06 19:21:44 matthew Exp $ +# $Id: index.cgi,v 1.71 2007-02-07 09:56:15 matthew Exp $ # TODO # Nothing is done about the update checkboxes - not stored anywhere on anything! @@ -752,6 +752,7 @@ sub geocode_string { if (-s $cache_file) { $js = File::Slurp::read_file($cache_file); } else { + $url .= ',+United+Kingdom' unless $url =~ /United\+Kingdom$/; $js = LWP::Simple::get($url); File::Slurp::write_file($cache_file, $js); } |