diff options
author | ivan <ivan> | 2011-07-15 21:10:40 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-07-15 21:10:40 +0000 |
commit | 0e7c29b192fff137d3b9167b29633a94f94b995f (patch) | |
tree | 7bf403bd486c7266d533c1f5d7af0bdb80eb07d3 /FS/FS/Cron | |
parent | 945580551410383965a86beadb095a760fa4ce5b (diff) |
add signup-duplicate_cc-warn_hours to warn about duplicate signups in a time span, RT#12011
Diffstat (limited to 'FS/FS/Cron')
-rw-r--r-- | FS/FS/Cron/expire_banned_pay.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/FS/FS/Cron/expire_banned_pay.pm b/FS/FS/Cron/expire_banned_pay.pm new file mode 100644 index 0000000..fe94590 --- /dev/null +++ b/FS/FS/Cron/expire_banned_pay.pm @@ -0,0 +1,20 @@ +package FS::Cron::expire_banned_pay; + +use vars qw( @ISA @EXPORT_OK ); +use Exporter; +use FS::UID qw(dbh); + +@ISA = qw( Exporter ); +@EXPORT_OK = qw( expire_banned_pay ); + +sub expire_banned_pay { + my $sql = "DELETE FROM banned_pay WHERE end_date IS NOT NULL". + " AND end_date < ?"; + my $sth = dbh->prepare($sql) or die dbh->errstr; + $sth->execute(time) or die $sth->errstr; + + dbh->commit or die dbh->errstr if $FS::UID::AutoCommit + +} + +1; |