From: Mitch Jackson Date: Tue, 14 Aug 2018 23:11:00 +0000 (-0400) Subject: RT# 78547 - consolidate noexport_hack X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7be116339beee253f9bf8805076c766cf0f8e318 RT# 78547 - consolidate noexport_hack --- diff --git a/FS/FS/part_export/a2billing.pm b/FS/FS/part_export/a2billing.pm index 15410aebf..dbbd1bef8 100644 --- a/FS/FS/part_export/a2billing.pm +++ b/FS/FS/part_export/a2billing.pm @@ -105,7 +105,7 @@ sub replace { ''; } -sub export_insert { +sub _export_insert { my $self = shift; my $svc = shift; my $cust_pkg = $svc->cust_svc->cust_pkg; @@ -290,7 +290,7 @@ sub export_insert { ''; } -sub export_delete { +sub _export_delete { my $self = shift; my $svc = shift; @@ -376,7 +376,7 @@ sub export_delete { ''; } -sub export_replace { +sub _export_replace { my $self = shift; my $new = shift; my $old = shift || $self->replace_old; @@ -421,7 +421,7 @@ sub export_replace { ''; } -sub export_suspend { +sub _export_suspend { my $self = shift; my $svc = shift; @@ -446,7 +446,7 @@ sub export_suspend { $error || ''; } -sub export_unsuspend { +sub _export_unsuspend { my $self = shift; my $svc = shift; diff --git a/FS/FS/part_export/acct_opensrs.pm b/FS/FS/part_export/acct_opensrs.pm index 51cee97a3..c131900d3 100644 --- a/FS/FS/part_export/acct_opensrs.pm +++ b/FS/FS/part_export/acct_opensrs.pm @@ -87,7 +87,7 @@ sub app { return; } -sub export_insert { +sub _export_insert { my $self = shift; my $new = shift; my $app = $self->app; @@ -134,7 +134,7 @@ sub export_insert { } } -sub export_delete { +sub _export_delete { my $self = shift; my $old = shift; my $app = $self->app; @@ -160,7 +160,7 @@ sub export_delete { } } -sub export_replace { +sub _export_replace { my $self = shift; my ($new, $old) = @_; my $app = $self->app; @@ -222,7 +222,7 @@ sub export_replace { } } -sub export_suspend { +sub _export_suspend { my $self = shift; my $svc = shift; my $unsuspend = shift || 0; @@ -243,7 +243,7 @@ sub export_suspend { return; } -sub export_unsuspend { +sub _export_unsuspend { my ($self, $svc) = @_; $self->export_suspend($svc, 1); } diff --git a/FS/FS/part_export/aradial.pm b/FS/FS/part_export/aradial.pm index c7356bf39..c5c55452c 100644 --- a/FS/FS/part_export/aradial.pm +++ b/FS/FS/part_export/aradial.pm @@ -41,7 +41,7 @@ service types, create another export instance.

' ); -sub export_insert { +sub _export_insert { my ($self, $svc) = @_; my $result = $self->request_user_edit( 'Add' => 1, @@ -54,7 +54,7 @@ sub export_insert { $result; } -sub export_replace { +sub _export_replace { my ($self, $new, $old) = @_; if ($new->email ne $old->email) { return $old->export_delete || $new->export_insert; @@ -70,7 +70,7 @@ sub export_replace { ); } -sub export_suspend { +sub _export_suspend { my ($self, $svc) = @_; $self->request_user_edit( 'Modify' => 1, @@ -79,7 +79,7 @@ sub export_suspend { ); } -sub export_unsuspend { +sub _export_unsuspend { my ($self, $svc) = @_; $self->request_user_edit( 'Modify' => 1, @@ -88,7 +88,7 @@ sub export_unsuspend { ); } -sub export_delete { +sub _export_delete { my ($self, $svc) = @_; $self->request_user_edit( 'ConfirmDelete' => 1, diff --git a/FS/FS/part_export/bandwidth_com.pm b/FS/FS/part_export/bandwidth_com.pm index 6d868e640..b39bffb69 100644 --- a/FS/FS/part_export/bandwidth_com.pm +++ b/FS/FS/part_export/bandwidth_com.pm @@ -69,7 +69,7 @@ value, or a list of fixed values, for the sip_server field.

END ); -sub export_insert { +sub _export_insert { my($self, $svc_phone) = (shift, shift); local $SIG{__DIE__}; try { @@ -100,7 +100,7 @@ sub export_insert { }; } -sub export_replace { +sub _export_replace { my ($self, $new, $old) = @_; # we only export the IP address and the phone number, # neither of which we can change in place. @@ -111,7 +111,7 @@ sub export_replace { ''; } -sub export_delete { +sub _export_delete { my ($self, $svc_phone) = (shift, shift); local $SIG{__DIE__}; try { diff --git a/FS/FS/part_export/broadband_nas.pm b/FS/FS/part_export/broadband_nas.pm index 8c152be45..d52ccae88 100644 --- a/FS/FS/part_export/broadband_nas.pm +++ b/FS/FS/part_export/broadband_nas.pm @@ -69,7 +69,7 @@ will be applied to the attached NAS record. =cut -sub export_insert { +sub _export_insert { my $self = shift; my $svc_broadband = shift; my %hash = ( @@ -103,7 +103,7 @@ sub export_insert { return; } -sub export_delete { +sub _export_delete { my $self = shift; my $svc_broadband = shift; my $svcnum = $svc_broadband->svcnum; @@ -118,7 +118,7 @@ sub export_delete { return; } -sub export_replace { +sub _export_replace { my $self = shift; my ($new_svc, $old_svc) = (shift, shift); diff --git a/FS/FS/part_export/broadband_snmp.pm b/FS/FS/part_export/broadband_snmp.pm index 56d7816b2..8ebc716e7 100644 --- a/FS/FS/part_export/broadband_snmp.pm +++ b/FS/FS/part_export/broadband_snmp.pm @@ -62,27 +62,27 @@ svc_broadband fields may be prefixed with $new_ and $old_ END ); -sub export_insert { +sub _export_insert { my $self = shift; $self->export_command('insert', @_); } -sub export_delete { +sub _export_delete { my $self = shift; $self->export_command('delete', @_); } -sub export_replace { +sub _export_replace { my $self = shift; $self->export_command('replace', @_); } -sub export_suspend { +sub _export_suspend { my $self = shift; $self->export_command('suspend', @_); } -sub export_unsuspend { +sub _export_unsuspend { my $self = shift; $self->export_command('unsuspend', @_); } diff --git a/FS/FS/part_export/northern_911.pm b/FS/FS/part_export/northern_911.pm index 027a52d21..679f5daf6 100644 --- a/FS/FS/part_export/northern_911.pm +++ b/FS/FS/part_export/northern_911.pm @@ -47,7 +47,7 @@ sub client { return $self->get('client'); } -sub export_insert { +sub _export_insert { my( $self, $svc_phone ) = (shift, shift); my %location_hash = $svc_phone->location_hash; @@ -98,7 +98,7 @@ sub export_insert { ''; } -sub export_replace { +sub _export_replace { my( $self, $new, $old ) = (shift, shift, shift); # except when changing the phone number, exactly like export_insert; @@ -109,7 +109,7 @@ sub export_replace { $self->export_insert($new); } -sub export_delete { +sub _export_delete { my ($self, $svc_phone) = (shift, shift); if ($self->option('debug')) { diff --git a/FS/FS/part_export/thinktel.pm b/FS/FS/part_export/thinktel.pm index 67cf2b0da..9ab645539 100644 --- a/FS/FS/part_export/thinktel.pm +++ b/FS/FS/part_export/thinktel.pm @@ -131,7 +131,7 @@ sub check_svc { # check the service for validity ''; } -sub export_insert { +sub _export_insert { my($self, $svc_x) = (shift, shift); my $error = $self->check_svc($svc_x); @@ -294,7 +294,7 @@ sub insert_trunk { } } -sub export_replace { +sub _export_replace { my ($self, $svc_new, $svc_old) = @_; my $error = $self->check_svc($svc_new); @@ -412,7 +412,7 @@ sub replace_gateway { } } -sub export_delete { +sub _export_delete { my ($self, $svc_x) = (shift, shift); my $role = $self->svc_role($svc_x) diff --git a/FS/FS/part_export/voip_ms.pm b/FS/FS/part_export/voip_ms.pm index 251988485..1eedd66ac 100644 --- a/FS/FS/part_export/voip_ms.pm +++ b/FS/FS/part_export/voip_ms.pm @@ -133,7 +133,7 @@ our %info = ( END ); -sub export_insert { +sub _export_insert { my($self, $svc_x) = (shift, shift); my $role = $self->svc_role($svc_x); @@ -162,7 +162,7 @@ sub export_insert { ''; } -sub export_replace { +sub _export_replace { my ($self, $svc_new, $svc_old) = @_; my $role = $self->svc_role($svc_new); my $error; @@ -175,7 +175,7 @@ sub export_replace { ''; } -sub export_delete { +sub _export_delete { my ($self, $svc_x) = (shift, shift); my $role = $self->svc_role($svc_x); if ( $role eq 'subacct' ) { @@ -204,7 +204,7 @@ sub export_delete { ''; } -sub export_suspend { +sub _export_suspend { my $self = shift; my $svc_x = shift; my $role = $self->svc_role($svc_x); @@ -215,7 +215,7 @@ sub export_suspend { ''; } -sub export_unsuspend { +sub _export_unsuspend { my $self = shift; my $svc_x = shift; my $role = $self->svc_role($svc_x);