summaryrefslogtreecommitdiff
path: root/FS/FS/svc_broadband.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-10 05:16:54 +0000
committerlevinse <levinse>2011-06-10 05:16:54 +0000
commit6361e71971a84c4f798c2f4eef89bbd454a3cb0d (patch)
treecef6785e494f33681b424beb8a32f0c0abc0bc4c /FS/FS/svc_broadband.pm
parentc7bf005860b761a55ca075df987fb3b5ade8c242 (diff)
svc_broadband add/edit: configurable require co-ordinates in NW quadrant, RT12925
Diffstat (limited to 'FS/FS/svc_broadband.pm')
-rwxr-xr-xFS/FS/svc_broadband.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index 2b794aa..f1a233b 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -334,6 +334,10 @@ sub check {
return $x unless ref($x);
+ my $nw_coords = $conf->exists('svc_broadband-require-nw-coordinates');
+ my $lat_lower = $nw_coords ? 1 : -90;
+ my $lon_upper = $nw_coords ? -1 : 180;
+
my $error =
$self->ut_numbern('svcnum')
|| $self->ut_numbern('blocknum')
@@ -343,8 +347,8 @@ sub check {
|| $self->ut_ipn('ip_addr')
|| $self->ut_hexn('mac_addr')
|| $self->ut_hexn('auth_key')
- || $self->ut_coordn('latitude', -90, 90)
- || $self->ut_coordn('longitude', -180, 180)
+ || $self->ut_coordn('latitude', $lat_lower, 90)
+ || $self->ut_coordn('longitude', -180, $lon_upper)
|| $self->ut_sfloatn('altitude')
|| $self->ut_textn('vlan_profile')
|| $self->ut_textn('plan_id')