diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-09-20 15:44:22 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-09-20 15:44:22 +0100 |
commit | 891ce12c012e2c02e8f024f3701ca9ceef5a4bbf (patch) | |
tree | 769c51c48e6427cb5ded45343b2b6abbe3db5e34 /bin/send-reports | |
parent | 3a05b6e399de926decfe732a8bff9f4e80fc39c5 (diff) |
Decode template files read in with read_file, to prevent double encoding (fixes #159). Also fix Welsh I18N test.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-x | bin/send-reports | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/send-reports b/bin/send-reports index 1af3ba1ea..9ab6f8274 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -12,7 +12,6 @@ require 5.8.0; use Digest::MD5; use Encode; use Error qw(:try); -use File::Slurp; use JSON; use LWP::UserAgent; use LWP::Simple; @@ -117,7 +116,7 @@ while (my $row = $unsent->next) { push @to, [ $council_email, $name ]; @recips = ($council_email); $send_email = 1; - $template = File::Slurp::read_file("$FindBin::Bin/../templates/email/emptyhomes/" . $row->lang . "/submit.txt"); + $template = Utils::read_file("$FindBin::Bin/../templates/email/emptyhomes/" . $row->lang . "/submit.txt"); } else { @@ -166,7 +165,7 @@ while (my $row = $unsent->next) { my $template_path = FixMyStreet->path_to( "templates", "email", $cobrand->moniker, $template )->stringify; $template_path = FixMyStreet->path_to( "templates", "email", "default", $template )->stringify unless -e $template_path; - $template = File::Slurp::read_file( $template_path ); + $template = Utils::read_file( $template_path ); if ($h{category} eq _('Other')) { $h{category_footer} = _('this type of local problem'); |