aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports5
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');