sub table { 'svc_domain'; }
-=item insert
+=item insert [ , OPTION => VALUE ... ]
Adds this domain to the database. If there is an error, returns the error,
otherwise returns false.
appropriate records are added to the domain_record table (see
L<FS::domain_record>).
+Currently available options are: I<depend_jobnum>
+
+If I<depend_jobnum> is set (to a scalar jobnum or an array reference of
+jobnums), all provisioning jobs will have a dependancy on the supplied
+jobnum(s) (they will not run until the specific job(s) complete(s)).
+
=cut
sub insert {
return "Domain not found (see whois)";
}
- $error = $self->SUPER::insert;
+ $error = $self->SUPER::insert(@_);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
return "Can't change domain - reorder."
if $old->getfield('domain') ne $new->getfield('domain');
+ # Better to do it here than to force the caller to remember that svc_domain is weird.
+ $new->setfield(action => 'M');
my $error = $new->SUPER::replace($old);
return $error if $error;
}
}
#if ( $recref->{domain} =~ /^([\w\-\.]{1,22})\.(com|net|org|edu)$/ ) {
- if ( $recref->{domain} =~ /^([\w\-]{1,22})\.(com|net|org|edu)$/ ) {
+ if ( $recref->{domain} =~ /^([\w\-]{1,63})\.(com|net|org|edu)$/ ) {
$recref->{domain} = "$1.$2";
# hmmmmmmmm.
} elsif ( $whois_hack && $recref->{domain} =~ /^([\w\-\.]+)$/ ) {
return "Unknown catchall" unless $svc_acct;
}
- $self->ut_textn('purpose');
+ $self->ut_textn('purpose')
+ or $self->SUPER::check;
}