[freeside-commits] freeside/FS/FS phone_avail.pm,1.4.8.5,1.4.8.6
Erik Levinson
levinse at wavetail.420.am
Tue Jan 11 07:49:14 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv19033/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
phone_avail.pm
Log Message:
Vitelity DID selection improvements, RT4868
Index: phone_avail.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/phone_avail.pm,v
retrieving revision 1.4.8.5
retrieving revision 1.4.8.6
diff -u -w -d -r1.4.8.5 -r1.4.8.6
--- phone_avail.pm 28 Dec 2010 17:20:16 -0000 1.4.8.5
+++ phone_avail.pm 11 Jan 2011 15:49:12 -0000 1.4.8.6
@@ -195,6 +195,21 @@
}
+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) = @_;
More information about the freeside-commits
mailing list