diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport/EmptyHomes.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/EmptyHomes.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/SendReport/EmptyHomes.pm b/perllib/FixMyStreet/SendReport/EmptyHomes.pm index 6c4a253d3..e1b914523 100644 --- a/perllib/FixMyStreet/SendReport/EmptyHomes.pm +++ b/perllib/FixMyStreet/SendReport/EmptyHomes.pm @@ -6,9 +6,7 @@ use namespace::autoclean; BEGIN { extends 'FixMyStreet::SendReport::Email'; } sub build_recipient_list { - my $self = shift; - my $row = shift; - my $areas_info = shift; + my ( $self, $row, $h ) = @_; my %recips; my $all_confirmed = 1; @@ -30,10 +28,10 @@ sub build_recipient_list { #$note{$council_email}{$row->category} = $note; } - push @{ $self->to }, [ $council_email, $self->councils->{ $council } ]; + push @{ $self->to }, [ $council_email, $self->councils->{ $council }->{name} ]; $recips{$council_email} = 1; - my $country = $areas_info->{$council}->{country}; + my $country = $self->councils->{$council}->{country}; if ($country eq 'W') { $recips{ 'shelter@' . mySociety::Config::get('EMAIL_DOMAIN') } = 1; } else { @@ -45,4 +43,9 @@ sub build_recipient_list { return keys %recips; } +sub get_template { + my ( $self, $row ) = @_; + return Utils::read_file( FixMyStreet->path_to( "templates", "email", "emptyhomes", $row->lang, "submit.txt" )->stringify ); +} + 1; |