[freeside-commits] freeside/httemplate/edit/process qual.cgi, 1.3, 1.4

Ivan,,, ivan at wavetail.420.am
Sun Mar 6 09:47:55 PST 2011


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv27832

Modified Files:
	qual.cgi 
Log Message:
strip non-digits from phone numbers instead of throwing a nasty error, on dsl qualifications w/ spaces or dashes, RT#7111

Index: qual.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/qual.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- qual.cgi	7 Dec 2010 20:38:51 -0000	1.3
+++ qual.cgi	6 Mar 2011 17:47:53 -0000	1.4
@@ -37,7 +37,9 @@
 $cgi->param('exportnum') =~ /^(\d+)$/ or die 'illegal exportnum';
 my $exportnum = $1;
 
-$cgi->param('phonenum') =~ /^(\d*)$/ or die 'illegal phonenum';
+my $phonenum = $cgi->param('phonenum');
+$phonenum =~ s/\D//g;
+$phonenum =~ /^(\d*)$/ or die 'illegal phonenum';
 my $phonenum = $1;
 
 $cgi->param('locationnum') =~ /^(\-?\d*)$/



More information about the freeside-commits mailing list