diff options
author | levinse <levinse> | 2010-12-01 05:56:10 +0000 |
---|---|---|
committer | levinse <levinse> | 2010-12-01 05:56:10 +0000 |
commit | ad17d8651adb39fdef45f509490a6b2c6eac8301 (patch) | |
tree | 870832dd91871a0356b044f840d364df416150a6 /FS/FS/svc_dsl.pm | |
parent | b638e75f063e231edaf3f3859d27f3981c12c999 (diff) |
-ikano, svc_dsl, dsl_note, and qual on-going implementation, RT7111
-add predelete_hook_first and predelete_hook into svc_Common (don't use yet, might change or be removed
soon)
-add new cust_location fields into geocode_Mixin location_hash
Diffstat (limited to 'FS/FS/svc_dsl.pm')
-rw-r--r-- | FS/FS/svc_dsl.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/FS/FS/svc_dsl.pm b/FS/FS/svc_dsl.pm index 93d3570..c5557ec 100644 --- a/FS/FS/svc_dsl.pm +++ b/FS/FS/svc_dsl.pm @@ -263,6 +263,27 @@ sub check { $self->SUPER::check; } +sub predelete_hook_first { + my $self = shift; + my @exports = $self->part_svc->part_export_dsl_pull; + return 'More than one DSL-pulling export attached' if scalar(@exports) > 1; + if ( scalar(@exports) == 1 ) { + my $export = $exports[0]; + return $export->dsl_pull($self); + } + ''; +} + +sub predelete_hook { + my $self = shift; + my @notes = $self->notes; + foreach my $note ( @notes ) { + my $error = $note->delete; + return $error if $error; + } + ''; +} + =back =head1 SEE ALSO |