X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_Common.pm;h=73658f67af979c642f66aeb10f52f57541b345c3;hb=62e6a2b1c99086f3a9097f2d9d29fd8c414564b8;hp=355c38342ba6c4f91a71bbe732a46c8f026ea8d8;hpb=37047d680db893694234b8d470a231d84597a25a;p=freeside.git diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 355c38342..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; @@ -1349,6 +1352,9 @@ sub search_sql { #my( $class, $string ) = @_; '1 = 0'; #false } +sub search_sql_addl_from { + ''; +} =item search HASHREF