X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_Common.pm;h=73658f67af979c642f66aeb10f52f57541b345c3;hb=a2408d6aa3cce0e3673ae75d14414178c4c24987;hp=35415a26f5795cffbc0fe20ad09fb9453e615ee1;hpb=a87e91ee19d14a6fc3da62f4b44a9628d32bb6a3;p=freeside.git diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 35415a26f..73658f67a 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -1154,7 +1154,9 @@ Runs the provided export hook (i.e. "suspend", "unsuspend") for this service. sub export { my( $self, $method ) = ( shift, shift ); + # $method must start with export_, $action must be the part after that $method = "export_$method" unless $method =~ /^export_/; + my ($action) = $method =~ /^export_(\w+)/; local $SIG{HUP} = 'IGNORE'; local $SIG{INT} = 'IGNORE'; @@ -1171,6 +1173,7 @@ sub export { unless ( $noexport_hack ) { foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { next unless $part_export->can($method); + next if $part_export->get("no_$action"); # currently only 'no_suspend' my $error = $part_export->$method($self, @_); if ( $error ) { $dbh->rollback if $oldAutoCommit;