summaryrefslogtreecommitdiff
path: root/FS/FS/part_export/shellcommands.pm
diff options
context:
space:
mode:
authorMitch Jackson <mitch@mitchjacksontech.com>2018-08-14 19:53:23 -0400
committerMitch Jackson <mitch@freeside.biz>2018-09-19 00:41:51 -0400
commitcb06cc9e1aec923326a38d06a17bc1a23cee7246 (patch)
tree8e95c583b4b05923bc06533fca54c13f7baa2174 /FS/FS/part_export/shellcommands.pm
parentc6c2d3beb9d4fc572132e1328546649c2b10697d (diff)
RT# 78547 noexport_hack part_export::shellcommands
Diffstat (limited to 'FS/FS/part_export/shellcommands.pm')
-rw-r--r--FS/FS/part_export/shellcommands.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index 7c280e5..fb7d166 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -7,6 +7,7 @@ use String::ShellQuote;
use Net::OpenSSH;
use FS::part_export;
use FS::Record qw( qsearch qsearchs );
+use Carp qw(carp);
@ISA = qw(FS::part_export);
@@ -267,6 +268,12 @@ sub _export_unsuspend {
sub export_pkg_change {
my( $self, $svc_acct, $new_cust_pkg, $old_cust_pkg ) = @_;
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp 'export_pkg_change() suppressed by noexport_hack'
+ if $self->option('debug');
+ return;
+ }
+
my @fields = qw( pkgnum pkgpart agent_pkgid ); #others?
my @date_fields = qw( order_date start_date setup bill last_bill susp adjourn
resume cancel uncancel expire contract_end );
@@ -291,6 +298,13 @@ sub export_pkg_change {
sub _export_command_or_super {
my($self, $action) = (shift, shift);
+
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp "_export_command_or_super($action) suppressed by noexport_hack"
+ if $self->option('debug');
+ return;
+ }
+
if ( $self->option($action) =~ /^\s*$/ ) {
my $method = "SUPER::_export_$action";
$self->$method(@_);
@@ -303,6 +317,12 @@ sub _export_command {
my ( $self, $action, $svc_acct) = (shift, shift, shift);
my $command = $self->option($action);
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp "_export_command($action) suppressed by noexport_hack"
+ if $self->option('debug');
+ return;
+ }
+
return '' if $command =~ /^\s*$/;
my $stdin = $self->option($action."_stdin");