aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/SendReport')
-rw-r--r--perllib/FixMyStreet/SendReport/Angus.pm1
-rw-r--r--perllib/FixMyStreet/SendReport/EastHants.pm6
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm7
-rw-r--r--perllib/FixMyStreet/SendReport/Open311.pm3
4 files changed, 7 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/SendReport/Angus.pm b/perllib/FixMyStreet/SendReport/Angus.pm
index cab5de173..b552fbd9d 100644
--- a/perllib/FixMyStreet/SendReport/Angus.pm
+++ b/perllib/FixMyStreet/SendReport/Angus.pm
@@ -7,7 +7,6 @@ BEGIN { extends 'FixMyStreet::SendReport'; }
use Try::Tiny;
use Encode;
use XML::Simple;
-use mySociety::Web qw(ent);
sub get_auth_token {
my ($self, $authxml) = @_;
diff --git a/perllib/FixMyStreet/SendReport/EastHants.pm b/perllib/FixMyStreet/SendReport/EastHants.pm
index 55ec79613..b24123f94 100644
--- a/perllib/FixMyStreet/SendReport/EastHants.pm
+++ b/perllib/FixMyStreet/SendReport/EastHants.pm
@@ -6,7 +6,7 @@ BEGIN { extends 'FixMyStreet::SendReport'; }
use Try::Tiny;
use Encode;
-use mySociety::Web qw(ent);
+use HTML::Entities;
sub construct_message {
my %h = @_;
@@ -43,8 +43,8 @@ sub send {
$eh_service ||= Integrations::EastHantsWSDL->on_fault(sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, "\n"; });
try {
# ServiceName, RemoteCreatedBy, Salutation, FirstName, Name, Email, Telephone, HouseNoName, Street, Town, County, Country, Postcode, Comments, FurtherInfo, ImageURL
- my $message = ent(encode_utf8($h->{message}));
- my $name = ent(encode_utf8($h->{name}));
+ my $message = encode_entities(encode_utf8($h->{message}));
+ my $name = encode_entities(encode_utf8($h->{name}));
my $result = $eh_service->INPUTFEEDBACK(
$h->{category}, 'FixMyStreet', '', '', $name, $h->{email}, $h->{phone},
'', '', '', '', '', '', $message, 'Yes', $h->{image_url}
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 28f3411d0..eefb14553 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -12,15 +12,14 @@ sub build_recipient_list {
my $all_confirmed = 1;
foreach my $body ( @{ $self->bodies } ) {
- my $contact = $row->result_source->schema->resultset("Contact")->find( {
- deleted => 0,
+ my $contact = $row->result_source->schema->resultset("Contact")->not_deleted->find( {
body_id => $body->id,
category => $row->category
} );
- my ($body_email, $confirmed, $note) = ( $contact->email, $contact->confirmed, $contact->note );
+ my ($body_email, $state, $note) = ( $contact->email, $contact->state, $contact->note );
- unless ($confirmed) {
+ unless ($state eq 'confirmed') {
$all_confirmed = 0;
$note = 'Body ' . $row->bodies_str . ' deleted'
unless $note;
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm
index 059690612..eaa223bb2 100644
--- a/perllib/FixMyStreet/SendReport/Open311.pm
+++ b/perllib/FixMyStreet/SendReport/Open311.pm
@@ -35,8 +35,7 @@ sub send {
# Try and fill in some ones that we've been asked for, but not asked the user for
- my $contact = $row->result_source->schema->resultset("Contact")->find( {
- deleted => 0,
+ my $contact = $row->result_source->schema->resultset("Contact")->not_deleted->find( {
body_id => $body->id,
category => $row->category
} );