[freeside-commits] freeside/FS/FS phone_avail.pm,1.9,1.10

Erik Levinson levinse at wavetail.420.am
Tue Jan 11 07:49:13 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv19028/FS/FS

Modified Files:
	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.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- phone_avail.pm	28 Dec 2010 17:20:15 -0000	1.9
+++ phone_avail.pm	11 Jan 2011 15:49:11 -0000	1.10
@@ -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