diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 10:24:44 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 10:24:44 +0100 |
commit | b79082d29504baf7819e59f0ac20090df75b2ab6 (patch) | |
tree | 0971fb57ce9e06a6a3cd2692be7b4fa7d009fd9c /bin/send-reports | |
parent | 543ff3b83f4732df2cf60ac0b9ac64b145c01ae4 (diff) |
Fallback to default email template.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-x | bin/send-reports | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports index 008ab2fbc..3b7c51bc3 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -160,7 +160,10 @@ while (my $row = $unsent->next) { $template = 'submit.txt'; $template = 'submit-brent.txt' if $row->council eq 2488 || $row->council eq 2237; - $template = File::Slurp::read_file("$FindBin::Bin/../templates/email/" . $cobrand->moniker . "/$template"); + $template = FixMyStreet->path_to( "templates", "email", $cobrand->moniker, $template )->stringify; + $template = FixMyStreet->path_to( "templates", "email", "default", $template )->stringify + unless -e $template; + $template = File::Slurp::read_file( $template ); if ($h{category} eq _('Other')) { $h{category_footer} = _('this type of local problem'); |