diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-11-20 21:37:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-12-02 17:41:42 +0000 |
commit | 23949e52f20020fa56cd54655a487ef97ebbc222 (patch) | |
tree | fd8a58a3b6df905851ecbed5d83919d7d9d88ed1 /perllib/FixMyStreet/SendReport | |
parent | d48de55d99bd55b28c5aa0fd9f095e9c918b52cb (diff) |
Remove many uses of mySociety::Config.
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r-- | perllib/FixMyStreet/SendReport/EastHants.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Email.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/EmptyHomes.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 1 |
4 files changed, 7 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/SendReport/EastHants.pm b/perllib/FixMyStreet/SendReport/EastHants.pm index 697519b48..3eb8ffcfa 100644 --- a/perllib/FixMyStreet/SendReport/EastHants.pm +++ b/perllib/FixMyStreet/SendReport/EastHants.pm @@ -28,7 +28,7 @@ EOF } sub send { - return if mySociety::Config::get('STAGING_SITE'); + return if FixMyStreet->config('STAGING_SITE'); my ( $self, $row, $h ) = @_; diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm index 3e993ecd6..4d2c8bb17 100644 --- a/perllib/FixMyStreet/SendReport/Email.pm +++ b/perllib/FixMyStreet/SendReport/Email.pm @@ -75,7 +75,7 @@ sub send { my $recips = $self->build_recipient_list( $row, $h ); # on a staging server send emails to ourselves rather than the bodies - if (mySociety::Config::get('STAGING_SITE') && !mySociety::Config::get('SEND_REPORTS_ON_STAGING') && !FixMyStreet->test_mode) { + if (FixMyStreet->config('STAGING_SITE') && !FixMyStreet->config('SEND_REPORTS_ON_STAGING') && !FixMyStreet->test_mode) { $recips = 1; @{$self->to} = [ $row->user->email, $self->to->[0][1] || $row->name ]; } @@ -100,13 +100,13 @@ sub send { if (FixMyStreet::Email::test_dmarc($params->{From}[0])) { $params->{'Reply-To'} = [ $params->{From} ]; - $params->{From} = [ mySociety::Config::get('CONTACT_EMAIL'), $params->{From}[1] ]; + $params->{From} = [ FixMyStreet->config('CONTACT_EMAIL'), $params->{From}[1] ]; } my $result = FixMyStreet::Email::send_cron( $row->result_source->schema, $params, - mySociety::Config::get('CONTACT_EMAIL'), + FixMyStreet->config('CONTACT_EMAIL'), $nomail, $cobrand ); diff --git a/perllib/FixMyStreet/SendReport/EmptyHomes.pm b/perllib/FixMyStreet/SendReport/EmptyHomes.pm index a4cdd3e40..b5faf8ddc 100644 --- a/perllib/FixMyStreet/SendReport/EmptyHomes.pm +++ b/perllib/FixMyStreet/SendReport/EmptyHomes.pm @@ -34,11 +34,11 @@ sub build_recipient_list { my $area_info = mySociety::MaPit::call('area', $body->body_areas->first->area_id); my $country = $area_info->{country}; if ($country eq 'W') { - push @{$self->bcc}, 'wales@' . mySociety::Config::get('EMAIL_DOMAIN'); + push @{$self->bcc}, 'wales@' . FixMyStreet->config('EMAIL_DOMAIN'); } elsif ($country eq 'S') { - push @{$self->bcc}, 'scotland@' . mySociety::Config::get('EMAIL_DOMAIN'); + push @{$self->bcc}, 'scotland@' . FixMyStreet->config('EMAIL_DOMAIN'); } else { - push @{$self->bcc}, 'eha@' . mySociety::Config::get('EMAIL_DOMAIN'); + push @{$self->bcc}, 'eha@' . FixMyStreet->config('EMAIL_DOMAIN'); } } diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 1917c2f58..4844aa2e9 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -5,7 +5,6 @@ use namespace::autoclean; BEGIN { extends 'FixMyStreet::SendReport'; } -use mySociety::Config; use DateTime::Format::W3CDTF; use Open311; use Readonly; |