X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fexport_nas.pm;h=3e5b841126de9d365bec9669822b9bccbf85d72a;hp=3829b41c70a91f434e9703c42ac8e68211aed11c;hb=389b6f1116c3309c2ee57a6c295ed1a793503095;hpb=6b328acac2947b0809a3523179bf2948e0e04859 diff --git a/FS/FS/export_nas.pm b/FS/FS/export_nas.pm index 3829b41c7..3e5b84112 100644 --- a/FS/FS/export_nas.pm +++ b/FS/FS/export_nas.pm @@ -1,8 +1,10 @@ package FS::export_nas; +use base qw( FS::Record ); use strict; -use base qw( FS::Record ); -use FS::Record qw( qsearch qsearchs ); +use vars qw($noexport_hack); + +$noexport_hack = ''; =head1 NAME @@ -70,7 +72,11 @@ otherwise returns false. =cut -# the insert method can be inherited from FS::Record +sub insert { + my $self = shift; + $self->SUPER::insert || + ($noexport_hack ? '' : $self->part_export->export_nas_insert($self->nas)); +} =item delete @@ -78,16 +84,21 @@ Delete this record from the database. =cut -# the delete method can be inherited from FS::Record +sub delete { + my $self = shift; + ($noexport_hack ? '' : $self->part_export->export_nas_delete($self->nas)) + || $self->SUPER::delete; +} =item replace OLD_RECORD -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. +Unavailable. Delete the record and create a new one. =cut -# the replace method can be inherited from FS::Record +sub replace { + die "replace not implemented for export_nas records"; +} =item check