X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_Common.pm;h=748bcae125fc2560c886470b9757df3b5c5242d4;hb=8873189f93ad32da7f619959c51a35ed66e19b30;hp=35415a26f5795cffbc0fe20ad09fb9453e615ee1;hpb=212dee7b6078fc6a9dff3469b07274da5b1e905e;p=freeside.git diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 35415a26f..748bcae12 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -719,6 +719,8 @@ sub setx { sub part_svc { my $self = shift; + cluck 'svc_X->part_svc called' if $DEBUG; + #get part_svc my $svcpart; if ( $self->get('svcpart') ) { @@ -1154,7 +1156,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 +1175,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;