summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2002-06-23 19:16:45 +0000
committerivan <ivan>2002-06-23 19:16:45 +0000
commitb32a862877102bd755bec2c83713b6f3ffb35dfa (patch)
treea195cfff56faead7b93118385b3710f6ea6dad34 /FS
parent7283d56b43fad5d8c9d4b2f224f0e49201f9e901 (diff)
domain_record records attached to svc_www records are no longer delete-able,
patch from "Stephen Bechard" <steve@destek.net>, thanks! closes: Bug#434
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/domain_record.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/domain_record.pm b/FS/FS/domain_record.pm
index 03f9e10bb..37cc6c9e8 100644
--- a/FS/FS/domain_record.pm
+++ b/FS/FS/domain_record.pm
@@ -5,6 +5,7 @@ use vars qw( @ISA $noserial_hack );
#use FS::Record qw( qsearch qsearchs );
use FS::Record qw( qsearchs dbh );
use FS::svc_domain;
+use FS::svc_www;
@ISA = qw(FS::Record);
@@ -124,6 +125,9 @@ Delete this record from the database.
sub delete {
my $self = shift;
+ return "Can't delete a domain record which has a website!"
+ if qsearchs( 'svc_www', { 'recnum' => $self->recnum } );
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
@@ -309,7 +313,7 @@ sub svc_domain {
=head1 VERSION
-$Id: domain_record.pm,v 1.10 2002-06-10 23:02:41 ivan Exp $
+$Id: domain_record.pm,v 1.11 2002-06-23 19:16:45 ivan Exp $
=head1 BUGS