aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@balti.ukcod.org.uk>2010-07-22 14:39:37 +0100
committerMatthew Somerville <matthew@balti.ukcod.org.uk>2010-07-22 14:39:37 +0100
commitc8fc4502121fc1c3cb5857708c32e1a5bb2d0a33 (patch)
treee85f5fc1494a225563efe6446d38334e54555b70 /bin/send-reports
parentd1c37ea5edb5277376b6200324224388b4475375 (diff)
Update all FixMyStreet mapit calls.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 18f097188..c91de5e33 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -108,7 +108,7 @@ foreach my $row (@$unsent) {
if ($site eq 'emptyhomes') {
my $council = $row->{council};
- $areas_info = mySociety::MaPit::get_voting_areas_info([ $council ]);
+ $areas_info = mySociety::MaPit::call('areas', $council);
my $name = $areas_info->{$council}->{name};
my ($council_email, $confirmed, $note) = dbh()->selectrow_array(
"SELECT email,confirmed,note FROM contacts WHERE deleted='f'
@@ -132,7 +132,7 @@ foreach my $row (@$unsent) {
my @all_councils = split /,|\|/, $row->{council};
my ($councils, $missing) = $row->{council} =~ /^([\d,]+)(?:\|([\d,]+))?/;
my @councils = split /,/, $councils;
- $areas_info = mySociety::MaPit::get_voting_areas_info(\@all_councils);
+ $areas_info = mySociety::MaPit::call('areas', \@all_councils);
my (@dear, %recips);
my $all_confirmed = 1;
foreach my $council (@councils) {
@@ -267,7 +267,7 @@ if ($verbose) {
# Will do for now :)
sub essex_contact {
my ($E, $N) = @_;
- my $district = mySociety::MaPit::get_voting_areas_by_location({easting=>$E, northing=>$N}, 'polygon', 'DIS');
+ my $district = mySociety::MaPit::call('point', "27700/$E,$N", type => 'DIS');
($district) = keys %$district;
my $email;
$email = 'eastarea' if $district == 2315 || $district == 2312;
@@ -281,7 +281,7 @@ sub essex_contact {
# Oxfordshire has different contact addresses depending upon the district
sub oxfordshire_contact {
my ($E, $N) = @_;
- my $district = mySociety::MaPit::get_voting_areas_by_location({easting=>$E, northing=>$N}, 'polygon', 'DIS');
+ my $district = mySociety::MaPit::call('point', "27700/$E,$N", type => 'DIS');
($district) = keys %$district;
my $email;
$email = 'northernarea' if $district == 2419 || $district == 2420 || $district == 2421;