aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Schema/Domain.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Schema/Domain.pm')
-rw-r--r--lib/Fripost/Schema/Domain.pm19
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/Fripost/Schema/Domain.pm b/lib/Fripost/Schema/Domain.pm
index 36194d8..11502ea 100644
--- a/lib/Fripost/Schema/Domain.pm
+++ b/lib/Fripost/Schema/Domain.pm
@@ -480,16 +480,6 @@ the directory.
When set, this option locks down the domain before inserting it, and
send a message to I<email> with the unlocking token.
-=item B<webapp_url>
-
-The URL to send, together with the token, to provide instructions how to
-unlock the domain.
-
-=item B<tmpl_path>
-
-Where to find the e-mail template with the instructions how to unlock
-the domain.
-
=back
Errors can be caught with options B<-die> and B<-error>; See
@@ -560,18 +550,17 @@ sub add {
# Send token
email_valid ($options{'-send-confirmation-token'});
- my $tt = Template->new({ INCLUDE_PATH => $options{tmpl_path}
+ my $tt = Template->new({ INCLUDE_PATH => $self->cfg('tmpl_path') // './'
, INTERPOLATE => 1 })
or die $Template::ERROR;
my $vars = { domain => $domainname, token => $token };
- $vars->{unlockurl} = $options{webapp_url}
+ $vars->{unlockurl} = ($self->cfg('webapp_url') // '')
.encodeURIComponent($domainname)
- .'/?unlock='.$token
- if defined $options{webapp_url};
+ .'/?unlock='.$token;
my $data;
$tt->process( 'new-domain.tt', $vars, \$data) or die $tt->error;
- Fripost::Schema::Mail::->new( From => $options{email_from} //
+ Fripost::Schema::Mail::->new( From => $self->cfg('email_from') //
$ENV{USER}.'@localhost'
, To => $options{'-send-confirmation-token'}
, Subject => "Your new domain ".$domain->{name}