diff options
author | levinse <levinse> | 2011-01-11 15:49:12 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-01-11 15:49:12 +0000 |
commit | 66102a014ef61f1873c2bb6fc2374cab7793134c (patch) | |
tree | 228781550069177c0ecc6afe3844c2794a9e5b18 /FS/FS/phone_avail.pm | |
parent | 7934ac2de21debc15ce89405ed0f4c061c4f0236 (diff) |
Vitelity DID selection improvements, RT4868
Diffstat (limited to 'FS/FS/phone_avail.pm')
-rw-r--r-- | FS/FS/phone_avail.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/FS/FS/phone_avail.pm b/FS/FS/phone_avail.pm index 92286abb7..677195d92 100644 --- a/FS/FS/phone_avail.pm +++ b/FS/FS/phone_avail.pm @@ -195,6 +195,21 @@ sub process_batch_import { } +sub flush { # evil direct SQL + my $opt = shift; + + if ( $opt->{'ratecenter'} =~ /^[\w\s]+$/ + && $opt->{'state'} =~ /^[A-Z][A-Z]$/ + && $opt->{'exportnum'} =~ /^\d+$/) { + my $sth = dbh->prepare('delete from phone_avail where exportnum = ? '. + ' and state = ? and name = ?'); + $sth->execute($opt->{'exportnum'},$opt->{'state'},$opt->{'ratecenter'}) + or die $sth->errstr; + } + + ''; +} + # Used by FS::Upgrade to migrate to a new database. sub _upgrade_data { my ($class, %opts) = @_; |