Commit bee7038b authored by sikeda's avatar sikeda
Browse files

[-dev] Perltidy'ing sources.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12136 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent b1552e59
......@@ -34,7 +34,7 @@ use Data::Dumper;
use Sympa::Constants;
use Sympa::Database;
use Sympa::DatabaseDriver::LDAP;
use Sympa::Log; # Show err logs on STDERR.
use Sympa::Log; # Show err logs on STDERR.
my %options;
unless (
......@@ -152,4 +152,3 @@ L<Sympa::DatabaseDriver::LDAP>.
testldap.pl was renamed to sympa_test_ldap.pl on Sympa 6.2.
=cut
......@@ -46,7 +46,7 @@ unless ($sth) {
die 'Unable to prepare SQL statement';
}
my $total = 0;
my $total = 0;
my $total_md5 = 0;
while (my $user = $sth->fetchrow_hashref('NAME_lc')) {
......@@ -55,7 +55,7 @@ while (my $user = $sth->fetchrow_hashref('NAME_lc')) {
# Ignore empty passwords
next
unless defined $user->{'password_user'}
and length $user->{'password_user'};
and length $user->{'password_user'};
if ($user->{'password_user'} =~ /^[0-9a-f]{32}/) {
printf "Password from %s already encoded as md5 fingerprint\n",
......@@ -94,7 +94,7 @@ printf
if ($total_md5) {
printf
"Found in table user %d password stored using md5, did you run Sympa before upgrading ?\n",
$total_md5
$total_md5;
}
printf "Total password re-encoded using md5: %d\n", $total;
......@@ -126,4 +126,3 @@ form by reversible RC4.
Sympa 5.4 or later uses MD5 one-way hash function to encode user passwords.
=cut
......@@ -1059,23 +1059,23 @@ sub _load_auth {
'auth_service_name' => '[\w\-\.]+',
'auth_service_friendly_name' => '.*',
'authentication_info_url' => 'http(s)?:/.*',
'host' => '[\w\.\-]+(:\d+)?(\s*,\s*[\w\.\-]+(:\d+)?)*',
'bind_dn' => '.+',
'bind_password' => '.+',
'timeout' => '\d+',
'suffix' => '.+',
'scope' => 'base|one|sub',
'host' => '[\w\.\-]+(:\d+)?(\s*,\s*[\w\.\-]+(:\d+)?)*',
'bind_dn' => '.+',
'bind_password' => '.+',
'timeout' => '\d+',
'suffix' => '.+',
'scope' => 'base|one|sub',
'get_email_by_uid_filter' => '.+',
'email_attribute' => '\w+',
'use_ssl' => '1',
'use_start_tls' => '1',
'use_start_tls' => '1',
'ssl_version' => 'sslv2/3|sslv2|sslv3|tlsv1|tlsv1_1|tlsv1_2',
'ssl_ciphers' => '[\w:]+',
'ssl_cert' => '.+',
'ssl_key' => '.+',
'ca_verify' => '\w+',
'ca_path' => '.+',
'ca_file' => '.+',
'ssl_cert' => '.+',
'ssl_key' => '.+',
'ca_verify' => '\w+',
'ca_path' => '.+',
'ca_file' => '.+',
},
'generic_sso' => {
'service_name' => '.+',
......@@ -1085,23 +1085,23 @@ sub _load_auth {
'email_http_header' => '\w+',
'http_header_value_separator' => '.+',
'logout_url' => '.+',
'host' => '[\w\.\-]+(:\d+)?(\s*,\s*[\w\.\-]+(:\d+)?)*',
'bind_dn' => '.+',
'bind_password' => '.+',
'timeout' => '\d+',
'suffix' => '.+',
'scope' => 'base|one|sub',
'host' => '[\w\.\-]+(:\d+)?(\s*,\s*[\w\.\-]+(:\d+)?)*',
'bind_dn' => '.+',
'bind_password' => '.+',
'timeout' => '\d+',
'suffix' => '.+',
'scope' => 'base|one|sub',
'get_email_by_uid_filter' => '.+',
'email_attribute' => '\w+',
'use_ssl' => '1',
'use_start_tls' => '1',
'use_start_tls' => '1',
'ssl_version' => 'sslv2/3|sslv2|sslv3|tlsv1|tlsv1_1|tlsv1_2',
'ssl_ciphers' => '[\w:]+',
'ssl_cert' => '.+',
'ssl_key' => '.+',
'ca_verify' => '\w+',
'ca_path' => '.+',
'ca_file' => '.+',
'ssl_cert' => '.+',
'ssl_key' => '.+',
'ca_verify' => '\w+',
'ca_path' => '.+',
'ca_file' => '.+',
'force_email_verify' => '1',
'internal_email_by_netid' => '1',
'netid_http_header' => '[\w\-\.]+',
......
......@@ -161,4 +161,3 @@ This module was OBSOLETED.
Use L<Sympa::DatabaseManager> instead.
=cut
......@@ -970,4 +970,3 @@ L<Sympa::Family>,
L<Sympa::List>.
=cut
......@@ -1061,9 +1061,9 @@ sub rename_list {
$newfile =~ s/^$old_listname\_/$param{'new_listname'}\_/;
} elsif ($file =~ /^$old_listname/) {
$newfile =~ s/^$old_listname/$param{'new_listname'}/;
} elsif ($file =~ /^$old_listname\./) {
} elsif ($file =~ /^$old_listname\./) {
$newfile =~ s/^$old_listname\./$param{'new_listname'}\./;
} elsif ($file =~ /^$old_listname\@$robot\./) {
} elsif ($file =~ /^$old_listname\@$robot\./) {
$newfile =~
s/^$old_listname\@$robot\./$param{'new_listname'}\@$param{'new_robot'}\./;
} elsif ($file =~ /^$old_listname\@$robot\_/) {
......
......@@ -592,7 +592,7 @@ our @params = (
},
{ 'name' => 'urlize_min_size',
'default' => 10240, ## 10 kiB,
'vhost' => '1',
'vhost' => '1',
},
{ 'name' => 'sender_headers',
'default' => 'From',
......
......@@ -71,8 +71,7 @@ my %full_db_struct = (
},
'suspend_start_date_subscriber' => {
'struct' => 'int(11)',
'doc' =>
'the Unix time when message reception is suspended',
'doc' => 'the Unix time when message reception is suspended',
'order' => 6,
},
'suspend_end_date_subscriber' => {
......@@ -799,7 +798,7 @@ my %full_db_struct = (
'order' => 8,
},
},
'doc' => 'Used in conjunction with stat_table for users statistics.',
'doc' => 'Used in conjunction with stat_table for users statistics.',
'order' => 11,
},
......
......@@ -35,7 +35,7 @@ sub execute {
my $message = shift;
my @params = @_;
my $log = Sympa::Log->instance;
my $log = Sympa::Log->instance;
my $list = $message->{context};
......
......@@ -338,8 +338,8 @@ our %cpan_modules = (
},
'Template' => {
required_version => '2.15',
package_name => 'Template-Toolkit',
mandatory => 1,
package_name => 'Template-Toolkit',
mandatory => 1,
'gettext_id' =>
'Sympa template format, used for web pages and other mail, config file templates. See http://template-toolkit.org/.',
},
......
......@@ -229,7 +229,8 @@ sub store_spool {
# Will retry up to five times.
my $tries;
for ($tries = 0; $tries < 5; $tries++) {
my $marshalled = Sympa::Spool::marshal_metadata($message, $metadata_format,
my $marshalled =
Sympa::Spool::marshal_metadata($message, $metadata_format,
$metadata_keys);
my $path = $spool_dir . '/' . $marshalled;
......@@ -319,4 +320,3 @@ TBD.
L<Sympa::Message>, especially L<Serialization|Sympa::Message/"Serialization">.
=cut
......@@ -83,7 +83,7 @@ sub date_conv {
return time;
}
if ($arg =~ /^\d+$/) { # already an epoch date
if ($arg =~ /^\d+$/) { # already an epoch date
return $arg;
}
......
......@@ -1280,7 +1280,8 @@ sub DoMessage {
# Check the message for commands and catch them.
my $cmd = _check_command($message);
if (defined $cmd) {
$log->syslog('err', 'Found command "%s" in message, ignoring message', $cmd);
$log->syslog('err',
'Found command "%s" in message, ignoring message', $cmd);
Sympa::Report::reject_report_msg('user', 'routing_error', $sender,
{'message' => $message},
$robot_id, $msg_string, $list);
......
......@@ -571,17 +571,15 @@ sub install_module {
$CPAN::Config->{'tar_verbosity'} =
'none'; ## minimum verbosity with tar command
#CPAN::Shell->clean($module) if ($options->{'force'});
##CPAN::Shell->make($module);
##
##if ($options->{'force'}) {
##CPAN::Shell->force('test', $module);
##} else {
##CPAN::Shell->test($module);
##}
##
## Could use CPAN::Shell->force('install') if make test failed
# CPAN::Shell->clean($module) if ($options->{'force'});
# CPAN::Shell->make($module);
# if ($options->{'force'}) {
# CPAN::Shell->force('test', $module);
# } else {
# CPAN::Shell->test($module);
# }
# # Could use CPAN::Shell->force('install') if make test failed
CPAN::Shell->install($module);
## Check if module has been successfuly installed
......
......@@ -1361,10 +1361,10 @@ sub purge_spools {
# Expiring formatted held messages.
if (opendir my $dh, $Conf::Conf{'viewmail_dir'} . '/mod') {
my $base_dir = $Conf::Conf{'viewmail_dir'} . '/mod';
my @dirs = grep {!/\A\./ and -d $base_dir . '/' . $_ } readdir $dh;
my @dirs = grep { !/\A\./ and -d $base_dir . '/' . $_ } readdir $dh;
closedir $dh;
foreach my $list_id (@dirs) {
my $directory = $base_dir . '/' . $list_id;
my $directory = $base_dir . '/' . $list_id;
my $clean_delay = $Conf::Conf{'clean_delay_queuemod'};
if (-e $directory) {
_clean_spool($directory, $clean_delay);
......@@ -1717,7 +1717,7 @@ sub expire_bounce {
# Expiring formatted bounce messages.
if (opendir my $dh, $Conf::Conf{'viewmail_dir'} . '/bounce') {
my $base_dir = $Conf::Conf{'viewmail_dir'} . '/bounce';
my @dirs = grep {!/\A\./ and -d $base_dir . '/' . $_ } readdir $dh;
my @dirs = grep { !/\A\./ and -d $base_dir . '/' . $_ } readdir $dh;
closedir $dh;
foreach my $list_id (@dirs) {
my $directory = $base_dir . '/' . $list_id;
......
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