X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fdeploy_zone.pm;h=723b491c852ef47e7f75ec3e4a1cc368cf80684c;hp=306b4fb444ee04e4c022fbbc18296acbf61fa04e;hb=20961c94ea06ad3aa71fad2bd7f6903f83f02ebc;hpb=fcdbe29ee89b9aaa472a11032ff937c943a867c6 diff --git a/FS/FS/deploy_zone.pm b/FS/FS/deploy_zone.pm index 306b4fb44..723b491c8 100644 --- a/FS/FS/deploy_zone.pm +++ b/FS/FS/deploy_zone.pm @@ -187,8 +187,15 @@ returns the error, otherwise returns false. =cut -# the replace method can be inherited from FS::Record +sub replace { + my $self = shift; + my $old = shift || $self->replace_old; + + $self->expire_date(time) + if $self->disabled eq 'Y' && ! $old->disabled && ! $self->expire_date; + $self->SUPER::replace($old, @_); +} =item check Checks all fields to make sure this is a valid zone record. If there is