projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0995724
)
add "Omit TLD from domains" option, RT#16751
author
Ivan Kohler
<ivan@freeside.biz>
Mon, 5 Mar 2012 02:35:37 +0000
(18:35 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Mon, 5 Mar 2012 02:35:37 +0000
(18:35 -0800)
FS/FS/part_export/netsapiens.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/netsapiens.pm
b/FS/FS/part_export/netsapiens.pm
index
2869290
..
775e374
100644
(file)
--- a/
FS/FS/part_export/netsapiens.pm
+++ b/
FS/FS/part_export/netsapiens.pm
@@
-41,6
+41,7
@@
tie my %options, 'Tie::IxHash',
'device_password' => { label=>'NetSapiens tac2 Device API password' },
'device_url' => { label=>'NetSapiens tac2 Device URL' },
'domain' => { label=>'NetSapiens Domain' },
'device_password' => { label=>'NetSapiens tac2 Device API password' },
'device_url' => { label=>'NetSapiens tac2 Device URL' },
'domain' => { label=>'NetSapiens Domain' },
+ 'domain_no_tld' => { label=>'Omit TLD from domains', type=>'checkbox' },
'debug' => { label=>'Enable debugging', type=>'checkbox' },
%subscriber_fields,
%registrar_fields,
'debug' => { label=>'Enable debugging', type=>'checkbox' },
%subscriber_fields,
%registrar_fields,
@@
-105,7
+106,12
@@
sub _ns_command {
sub ns_domain {
my($self, $svc_phone) = (shift, shift);
sub ns_domain {
my($self, $svc_phone) = (shift, shift);
- $svc_phone->domain || $self->option('domain');
+ my $domain = $svc_phone->domain || $self->option('domain');
+
+ $domain =~ s/\.\w{2,4}$//
+ if $self->option('domain_no_tld');
+
+ $domain;
}
sub ns_subscriber {
}
sub ns_subscriber {