[freeside-commits] freeside/FS/FS svc_phone.pm,1.13,1.14

Ivan,,, ivan at wavetail.420.am
Mon Oct 27 18:23:10 PDT 2008


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

Modified Files:
	svc_phone.pm 
Log Message:
fix svc_phone non-numeric "phone numbers", RT#4204

Index: svc_phone.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_phone.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- svc_phone.pm	25 Oct 2008 00:37:02 -0000	1.13
+++ svc_phone.pm	28 Oct 2008 01:23:08 -0000	1.14
@@ -182,17 +182,20 @@
   my $conf = new FS::Conf;
 
   my $phonenum = $self->phonenum;
+  my $phonenum_check_method;
   if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) {
     $phonenum =~ s/\W//g;
+    $phonenum_check_method = 'ut_alpha';
   } else {
     $phonenum =~ s/\D//g;
+    $phonenum_check_method = 'ut_number';
   }
   $self->phonenum($phonenum);
 
   my $error = 
     $self->ut_numbern('svcnum')
     || $self->ut_numbern('countrycode')
-    || $self->ut_number('phonenum')
+    || $self->$phonenum_check_method('phonenum')
     || $self->ut_anything('sip_password')
     || $self->ut_numbern('pin')
     || $self->ut_textn('phone_name')



More information about the freeside-commits mailing list