aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-04-03 15:06:36 +0100
committerDave Arter <davea@mysociety.org>2018-04-03 15:06:36 +0100
commit246a419d5026f9ff067b2a34c375d34044225042 (patch)
treef9b7d75bbc6be2dcaea7071682d57fb7f744bed5 /perllib/FixMyStreet/Script/Reports.pm
parent87e5520fbad2f3697f22e51b59d61fee1f313a9c (diff)
Include cobrand in ‘report logged’ template params
This was causing broken URLs in emails when sending reports to Bucks, as there was no cobrand to call `base_url_for_report` on.
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index 1d19ee283..5e8c99037 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -78,6 +78,7 @@ sub send(;$) {
my $email_base_url = $cobrand->base_url_for_report($row);
my %h = map { $_ => $row->$_ } qw/id title detail name category latitude longitude used_map/;
$h{report} = $row;
+ $h{cobrand} = $cobrand;
map { $h{$_} = $row->user->$_ || '' } qw/email phone/;
$h{confirmed} = DateTime::Format::Pg->format_datetime( $row->confirmed->truncate (to => 'second' ) )
if $row->confirmed;