aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Questionnaires.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-06-11 14:12:04 +0200
committerMarius Halden <marius.h@lden.org>2016-06-11 14:12:04 +0200
commit1307e0674c8b0174f71b960785230c647320885c (patch)
tree305f74ebeaba78a01f1c0d919e8180941a3ee63d /perllib/FixMyStreet/Script/Questionnaires.pm
parent05310eb3ace46ab71d8d426359f17f5beeb7c115 (diff)
parent35e58052f4f1250a3c1bb40d126e36fcc735d209 (diff)
Merge tag 'v1.8.3' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/Script/Questionnaires.pm')
-rw-r--r--perllib/FixMyStreet/Script/Questionnaires.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm
index f72f59077..c5bc6bfe0 100644
--- a/perllib/FixMyStreet/Script/Questionnaires.pm
+++ b/perllib/FixMyStreet/Script/Questionnaires.pm
@@ -52,8 +52,6 @@ sub send_questionnaires_period {
# call checks if this is the host that sends mail for this cobrand.
next unless $cobrand->email_host;
- my $template = FixMyStreet->get_email_template($cobrand->moniker, $row->lang, 'questionnaire.txt');
-
my %h = map { $_ => $row->$_ } qw/name title detail category/;
$h{created} = Utils::prettify_duration( time() - $row->confirmed->epoch, 'week' );
@@ -78,14 +76,15 @@ sub send_questionnaires_period {
my $result = FixMyStreet::Email::send_cron(
$rs->result_source->schema,
+ 'questionnaire.txt',
+ \%h,
{
- _template_ => $template,
- _parameters_ => \%h,
To => [ [ $row->user->email, $row->name ] ],
},
undef,
$params->{nomail},
- $cobrand
+ $cobrand,
+ $row->lang,
);
unless ($result) {
print " ...success\n" if $params->{verbose};