diff options
author | matthew <matthew> | 2007-07-11 16:28:13 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-07-11 16:28:13 +0000 |
commit | 2a3611dff114ba5ba4897dc6838185e5d67cd3fc (patch) | |
tree | 3743313280b20bb4718b6cbd84ae7d408ac3df97 /bin/send-reports | |
parent | 347dfc7950cea85ece2faa1f7a6b615663e01796 (diff) |
Abuse.
Diffstat (limited to 'bin/send-reports')
-rwxr-xr-x | bin/send-reports | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports index cbd65fc36..9028bcf73 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-reports,v 1.42 2007-06-20 10:34:17 matthew Exp $ +# $Id: send-reports,v 1.43 2007-07-11 16:28:13 matthew Exp $ use strict; require 5.8.0; @@ -51,6 +51,11 @@ my $unsent = dbh()->selectall_arrayref( AND council IS NOT NULL", { Slice => {} }); foreach my $row (@$unsent) { + + if (dbh()->selectrow_array('select email from abuse where lower(email)=?', {}, lc($row->{email}))) { + dbh()->do("update problem set state='hidden' where id=?", {}, $row->{id}); + next; + } # XXX Needs locks! my @all_councils = split /,|\|/, $row->{council}; my ($councils, $missing) = $row->{council} =~ /^([\d,]+)(?:\|([\d,]+))?/; |