projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
839d3df
)
fix svc_phone non-numeric "phone numbers", RT#4204
author
ivan
<ivan>
Tue, 28 Oct 2008 01:23:08 +0000
(
01:23
+0000)
committer
ivan
<ivan>
Tue, 28 Oct 2008 01:23:08 +0000
(
01:23
+0000)
FS/FS/svc_phone.pm
patch
|
blob
|
history
diff --git
a/FS/FS/svc_phone.pm
b/FS/FS/svc_phone.pm
index
c356344
..
237bbf5
100644
(file)
--- a/
FS/FS/svc_phone.pm
+++ b/
FS/FS/svc_phone.pm
@@
-182,17
+182,20
@@
sub check {
my $conf = new FS::Conf;
my $phonenum = $self->phonenum;
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;
if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) {
$phonenum =~ s/\W//g;
+ $phonenum_check_method = 'ut_alpha';
} else {
$phonenum =~ s/\D//g;
} else {
$phonenum =~ s/\D//g;
+ $phonenum_check_method = 'ut_number';
}
$self->phonenum($phonenum);
my $error =
$self->ut_numbern('svcnum')
|| $self->ut_numbern('countrycode')
}
$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')
|| $self->ut_anything('sip_password')
|| $self->ut_numbern('pin')
|| $self->ut_textn('phone_name')