aboutsummaryrefslogtreecommitdiffstats
path: root/bin/send-reports
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-12 23:17:25 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-12 23:17:25 +0100
commit8fbbf08c1754247137da7d27569bdfa7ce12b300 (patch)
tree04fc33421b64184d55598c63bcf3c23e9ccd12d3 /bin/send-reports
parentdee9dc7f7456a304cd351de2d10fe2979455f691 (diff)
Remove old style DB call.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-xbin/send-reports9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/send-reports b/bin/send-reports
index fbbd3db5e..008ab2fbc 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -240,7 +240,7 @@ while (my $row = $unsent->next) {
} elsif ($send_web eq 'london') {
$h{message} = construct_london_message(%h);
if (!$nomail) {
- $result *= post_london_report(%h);
+ $result *= post_london_report( $row, %h );
}
}
@@ -359,7 +359,7 @@ EOF
}
sub post_london_report {
- my %h = @_;
+ my ( $problem, %h ) = @_;
my $phone = $h{phone};
my $mobile = '';
if ($phone =~ /^\s*07/) {
@@ -411,8 +411,9 @@ sub post_london_report {
my ($team) = $out =~ /<team>(.*?)<\/team>/;
$org = london_lookup($org);
- dbh()->do("update problem set external_id=?, external_body=?, external_team=? where id=?", {},
- $id, $org, $team, $h{id});
+ $problem->external_id( $id );
+ $problem->external_body( $org );
+ $problem->external_team( $team );
return 0;
}