diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-03-16 16:24:34 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-03-16 19:10:16 +0000 |
commit | 72e7c2ac4b6a644ee2bb002915122648d97c56e0 (patch) | |
tree | 6cc0ff6e8386d0aa53ac6bcfcdca8f4ae1dfa2ac /perllib/FixMyStreet/SendReport/NI.pm | |
parent | d0a16157fbd10f8bdf1a07c77331504c61bf7f5d (diff) |
[fixmystreet.com] Remove special NI code.
This is now handled by normal bodies in the admin. In order to remove
references in send_reports, tidy up (unused) EmptyHomes code a bit.
Diffstat (limited to 'perllib/FixMyStreet/SendReport/NI.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/NI.pm | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/perllib/FixMyStreet/SendReport/NI.pm b/perllib/FixMyStreet/SendReport/NI.pm deleted file mode 100644 index c60643566..000000000 --- a/perllib/FixMyStreet/SendReport/NI.pm +++ /dev/null @@ -1,37 +0,0 @@ -package FixMyStreet::SendReport::NI; - -use Moose; - -BEGIN { extends 'FixMyStreet::SendReport::Email'; } - -sub build_recipient_list { - my ( $self, $row, $h ) = @_; - - my $all_confirmed = 1; - foreach my $body ( @{ $self->bodies } ) { - my $contact = FixMyStreet::App->model("DB::Contact")->find( { - deleted => 0, - body_id => $body->id, - category => $row->category - } ); - - my ($email, $confirmed, $note) = ( $contact->email, $contact->confirmed, $contact->note ); - - unless ($confirmed) { - $all_confirmed = 0; - $email = 'N/A' unless $email; - } - - my $name = $body->name; - if ( $email =~ /^roads.([^@]*)\@drdni/ ) { - $name = "Roads Service (\u$1)"; - $h->{bodies_name} = $name; - $row->external_body( 'Roads Service' ); - } - push @{ $self->to }, [ $email, $name ]; - } - - return $all_confirmed && @{$self->to}; -} - -1; |