Commit ec3de774 authored by sikeda's avatar sikeda
Browse files

[-dev] Removing parameters no longer used.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12704 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 73d6987d
...@@ -276,8 +276,6 @@ sub request_auth { ...@@ -276,8 +276,6 @@ sub request_auth {
$data->{'type'} = 'review'; $data->{'type'} = 'review';
} }
$data->{'command_escaped'} =
Sympa::Tools::Text::escape_url($data->{'command'});
$data->{'auto_submitted'} = 'auto-replied'; $data->{'auto_submitted'} = 'auto-replied';
unless (Sympa::send_file($list, 'request_auth', $sender, $data)) { unless (Sympa::send_file($list, 'request_auth', $sender, $data)) {
$log->syslog('notice', $log->syslog('notice',
...@@ -292,9 +290,7 @@ sub request_auth { ...@@ -292,9 +290,7 @@ sub request_auth {
action => 'global_remind' action => 'global_remind'
); );
$data->{'command'} = "auth $keyauth remind *"; $data->{'command'} = "auth $keyauth remind *";
$data->{'command_escaped'} = $data->{'type'} = 'remind';
Sympa::Tools::Text::escape_url($data->{'command'});
$data->{'type'} = 'remind';
} }
$data->{'auto_submitted'} = 'auto-replied'; $data->{'auto_submitted'} = 'auto-replied';
......
...@@ -34,7 +34,6 @@ use IO::Scalar; ...@@ -34,7 +34,6 @@ use IO::Scalar;
use LWP::UserAgent; use LWP::UserAgent;
use POSIX qw(); use POSIX qw();
use Storable qw(); use Storable qw();
use URI::Escape qw();
use Sympa; use Sympa;
use Conf; use Conf;
...@@ -1655,17 +1654,14 @@ sub send_notify_to_owner { ...@@ -1655,17 +1654,14 @@ sub send_notify_to_owner {
$param->{'type'} = $operation; $param->{'type'} = $operation;
if ($operation eq 'warn-signoff') { if ($operation eq 'warn-signoff') {
$param->{'escaped_gecos'} = $param->{'gecos'};
$param->{'escaped_gecos'} =~ s/\s/\%20/g;
$param->{'escaped_who'} = $param->{'who'};
$param->{'escaped_who'} =~ s/\s/\%20/g;
foreach my $owner (@rcpt) { foreach my $owner (@rcpt) {
$param->{'one_time_ticket'} = Sympa::Ticket::create( $param->{'one_time_ticket'} = Sympa::Ticket::create(
$owner, $owner,
$robot, $robot,
'search/' 'search/'
. $self->{'name'} . '/' . Sympa::Tools::Text::encode_uri($self->{'name'})
. $param->{'escaped_who'}, . '/'
. Sympa::Tools::Text::encode_uri($param->{'who'}),
$param->{'ip'} $param->{'ip'}
); );
unless ( unless (
...@@ -1682,18 +1678,14 @@ sub send_notify_to_owner { ...@@ -1682,18 +1678,14 @@ sub send_notify_to_owner {
} }
} }
} elsif ($operation eq 'subrequest') { } elsif ($operation eq 'subrequest') {
if (defined $param->{'gecos'} and $param->{'gecos'} =~ /\S/) {
#FIXME: Escape metacharacters.
$param->{'escaped_gecos'} = $param->{'gecos'};
$param->{'escaped_gecos'} =~ s/\s/\%20/g;
}
$param->{'escaped_who'} = $param->{'who'};
$param->{'escaped_who'} =~ s/\s/\%20/g;
foreach my $owner (@rcpt) { foreach my $owner (@rcpt) {
$param->{'one_time_ticket'} = $param->{'one_time_ticket'} = Sympa::Ticket::create(
Sympa::Ticket::create($owner, $robot, $owner,
'subindex/' . $self->{'name'}, $robot,
$param->{'ip'}); 'subindex/'
. Sympa::Tools::Text::encode_uri($self->{'name'}),
$param->{'ip'}
);
unless ( unless (
Sympa::send_file( Sympa::send_file(
$self, 'listowner_notification', [$owner], $param $self, 'listowner_notification', [$owner], $param
...@@ -1708,13 +1700,7 @@ sub send_notify_to_owner { ...@@ -1708,13 +1700,7 @@ sub send_notify_to_owner {
} }
} }
} else { } else {
if ($operation eq 'sigrequest') { if ($operation eq 'bounce_rate') {
$param->{'escaped_who'} = $param->{'who'};
$param->{'escaped_who'} =~ s/\s/\%20/g;
$param->{'sympa'} =
Conf::get_robot_conf($self->{'domain'}, 'sympa');
} elsif ($operation eq 'bounce_rate') {
$param->{'rate'} = int($param->{'rate'} * 10) / 10; $param->{'rate'} = int($param->{'rate'} * 10) / 10;
} }
unless ( unless (
......
...@@ -117,10 +117,8 @@ sub _twist { ...@@ -117,10 +117,8 @@ sub _twist {
email => $email, email => $email,
action => 'subscribe' action => 'subscribe'
); );
my $command = "auth $keyauth sub $which $comment"; $context{'subject'} = sprintf 'auth %s sub %s %s', $keyauth,
$context{'subject'} = $command; $list->{'name'}, $comment;
$context{'url'} = "mailto:$sympa?subject=$command";
$context{'url'} =~ s/\s/%20/g;
unless (Sympa::send_file($list, 'invite', $email, \%context)) { unless (Sympa::send_file($list, 'invite', $email, \%context)) {
$log->syslog('notice', 'Unable to send template "invite" to %s', $log->syslog('notice', 'Unable to send template "invite" to %s',
$email); $email);
...@@ -149,9 +147,7 @@ sub _twist { ...@@ -149,9 +147,7 @@ sub _twist {
$self->add_stash($request, 'notice', 'invite', {'email' => $email}); $self->add_stash($request, 'notice', 'invite', {'email' => $email});
} elsif ($action !~ /\Areject\b/i) { } elsif ($action !~ /\Areject\b/i) {
$context{'subject'} = "sub $which $comment"; $context{'subject'} = sprintf 'sub %s %s', $list->{'name'}, $comment;
$context{'url'} = "mailto:$sympa?subject=$context{'subject'}";
$context{'url'} =~ s/\s/%20/g;
unless (Sympa::send_file($list, 'invite', $email, \%context)) { unless (Sympa::send_file($list, 'invite', $email, \%context)) {
$log->syslog('notice', 'Unable to send template "invite" to %s', $log->syslog('notice', 'Unable to send template "invite" to %s',
$email); $email);
......
...@@ -441,7 +441,8 @@ Escape quotation marks. ...@@ -441,7 +441,8 @@ Escape quotation marks.
=item escape_url =item escape_url
Escapes URL. Escapes URL.
See also L<Sympa::Tools::Text/"escape_url">.
This was OBSOLETED. Use L</"mailtourl"> instead.
=item escape_xml =item escape_xml
...@@ -473,7 +474,7 @@ A string representing date/time: ...@@ -473,7 +474,7 @@ A string representing date/time:
=back =back
=item mailto ( email, [ {key = val, ...}, [ nodecode ] ] ) =item mailto ( email, [ {key =E<gt> val, ...}, [ nodecode ] ] )
Generates HTML fragment linking to C<mailto:> URL, Generates HTML fragment linking to C<mailto:> URL,
i.e. C<E<lt>a href="mailto:I<email>"E<gt>I<filtered text>E<lt>/aE<gt>>. i.e. C<E<lt>a href="mailto:I<email>"E<gt>I<filtered text>E<lt>/aE<gt>>.
...@@ -489,7 +490,7 @@ If it does not contain nonspaces, e-mail address will be used. ...@@ -489,7 +490,7 @@ If it does not contain nonspaces, e-mail address will be used.
E-mail address(es) to be linked. E-mail address(es) to be linked.
=item {key = val, ...} =item {key =E<gt> val, ...}
Optional query. Optional query.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment