aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2013-01-26 03:39:18 +0100
committerGuilhem Moulin <guilhem.moulin@fripost.org>2013-01-26 03:39:18 +0100
commita1f02c6dd593f9e31127025e30d551df4b4cfc83 (patch)
tree3ea416022b87977f18c38e7964a76cfb60572aef
parentabee4fc028e486c84981cf3463932e505f09f3ff (diff)
wibble
-rw-r--r--lib/Fripost/Panel/Interface.pm13
-rw-r--r--lib/Fripost/Panel/Login.pm2
-rw-r--r--lib/Fripost/Schema/Domain.pm9
3 files changed, 11 insertions, 13 deletions
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm
index bb77ad6..79b77aa 100644
--- a/lib/Fripost/Panel/Interface.pm
+++ b/lib/Fripost/Panel/Interface.pm
@@ -71,7 +71,7 @@ sub AddDomain : Runmode {
Encode::_utf8_on($domainname) if defined $domainname;
my $session_param;
- $session_param = 'AddDomain-owner-emails-' . domain_to_ascii($domainname)
+ $session_param = 'AddDomain-owner-emails-'.domain_to_ascii($domainname)
if defined $domainname;
my $error; # Tells whether the change submission has failed.
@@ -81,7 +81,7 @@ sub AddDomain : Runmode {
if (defined $q->param('owner') and defined $session_param) {
# Ensure that the user didn't spoof the domain ownership.
- my @owners = split /\0/, $self->session->param($session_param);
+ my @owners = split "\0", $self->session->param($session_param);
$error = "‘".$q->param('owner')."’ was not listed among the domain owners."
unless defined $self->session->param($session_param)
and grep { $q->param('owner') eq $_ } @owners;
@@ -117,7 +117,7 @@ sub AddDomain : Runmode {
, loop_context_vars => 1 );
$template->param( $self->userInfo );
$template->param( error => encode_entities ($error) ) if $error;
- $template->param( &parse_CGI_query ($q) );
+ $template->param( &fill_HTML_template_from_query ($q) );
if (@owners) {
# Store the list we font, to ensure the user doesn't send back a
@@ -587,13 +587,10 @@ sub fill_HTML_template_from_query {
my %rest = @_;
my %vars;
- my @ok = qw/name isActive description catchAlls
- canAddAlias canAddList owner postmaster/;
-
$params{$_} = encode_entities ($rest{$_}) for keys %rest;
foreach my $key (keys %params) {
$vars{$key} = $params{$key} // undef
- if grep { $key eq $_ } (@single_valued_keys, @multi_valued_keys);
+ if grep { $key eq $_ } ('name', @single_valued_keys, @multi_valued_keys);
}
$vars{isActive} //= 1;
return %vars;
@@ -614,7 +611,7 @@ sub parse_CGI_query {
}
elsif (grep {$key eq $_} @multi_valued_keys) {
$entry->{$key} = $params{$key} ?
- [ split /\x{0D}\x{0A}/, $params{$key} ] :
+ [ split "\x{0D}\x{0A}", $params{$key} ] :
[];
$entry->{$key} = [ grep {$_} @{$entry->{$key}} ];
}
diff --git a/lib/Fripost/Panel/Login.pm b/lib/Fripost/Panel/Login.pm
index 09520a4..af40461 100644
--- a/lib/Fripost/Panel/Login.pm
+++ b/lib/Fripost/Panel/Login.pm
@@ -228,7 +228,7 @@ sub split_path {
$uri =~ s/^$script//s; # Strip the facing CGI script name
$uri =~ s/\?.*//s; # Strip the query
- map { decodeURIComponent($_); Encode::_utf8_on($_); $_ } (split /\//, $uri);
+ map { decodeURIComponent($_); Encode::_utf8_on($_); $_ } (split '/', $uri);
}
diff --git a/lib/Fripost/Schema/Domain.pm b/lib/Fripost/Schema/Domain.pm
index 738df0c..e8da9a5 100644
--- a/lib/Fripost/Schema/Domain.pm
+++ b/lib/Fripost/Schema/Domain.pm
@@ -443,9 +443,10 @@ sub list_owner_emails {
=item B<add> (I<domain>, I<OPTIONS>)
-Add the domain I<domain>, represented by a hash reference as explained
-above. If no owner is specified in I<domain>, the current user is
-automatically promoted owner instead.
+Add I<domain>, represented by a hash reference as explained above. If no
+owner is specified in I<domain>, the current user is automatically
+promoted owner. (If you you want to add a non self-managed domain,
+choose an empty string for the owner.)
The following options are considered:
@@ -604,7 +605,7 @@ sub _domain_to_entry {
=item B<unlock> (I<domainname>, I<token>, I<OPTIONS>)
-Unlock the pending domain I<domainname>, locked with I<token>.
+Unlock the pending I<domainname>, locked with I<token>.
Errors can be caught with options B<-die> and B<-error>, see
B<Fripost::Schema::Util> for details.