aboutsummaryrefslogtreecommitdiffstats
path: root/web/import.cgi
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-23 17:37:05 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-23 17:37:05 +0000
commit197d916501696c1d8811f05f1ef23e2a11d6e1b4 (patch)
tree931ff98a8202d537393362f36660ff08f1fd432c /web/import.cgi
parentf10475c5f5a8f7e6a24579c4575c5bb208cc0428 (diff)
parent9e3f0cc26dbbd0e1b3d9d4aaf89fffec41557027 (diff)
Merge branch 'master' of ssh://matthew@git.mysociety.org/data/git/public/fixmystreet
Diffstat (limited to 'web/import.cgi')
-rwxr-xr-xweb/import.cgi17
1 files changed, 4 insertions, 13 deletions
diff --git a/web/import.cgi b/web/import.cgi
index ac36b2ee5..371e70f7a 100755
--- a/web/import.cgi
+++ b/web/import.cgi
@@ -15,8 +15,6 @@ use Utils;
use mySociety::AuthToken;
use mySociety::Config;
use mySociety::EmailUtil;
-use mySociety::EvEl;
-use mySociety::Locale;
sub main {
my $q = shift;
@@ -112,23 +110,16 @@ sub main {
$id, $latitude, $longitude, $input{subject},
$input{detail}, $input{name}, $input{service}, $input{email}, $input{phone}, $photo);
- # Send checking email
- my $template = File::Slurp::read_file("$FindBin::Bin/../templates/emails/partial");
my $token = mySociety::AuthToken::store('partial', $id);
my %h = (
name => $input{name} ? ' ' . $input{name} : '',
- url => mySociety::Config::get('BASE_URL') . '/L/' . $token,
+ url => Page::base_url_with_lang($q, undef, 1) . '/L/' . $token,
service => $input{service},
+ title => $input{title},
+ detail => $input{detail},
);
- my $sender = mySociety::Config::get('CONTACT_EMAIL');
- $sender =~ s/team/fms-DO-NOT-REPLY/;
- mySociety::EvEl::send({
- _template_ => $template,
- _parameters_ => \%h,
- To => $input{name} ? [ [ $input{email}, $input{name} ] ] : $input{email},
- From => [ $sender, 'FixMyStreet' ],
- }, $input{email});
+ Page::send_email($q, $input{email}, $input{name}, 'partial', %h);
dbh()->commit();
print 'SUCCESS';