Skip to content

Commit c6713cb

Browse files
Sympa authorsikedas
Sympa authors
authored andcommitted
tidyall
1 parent 5200433 commit c6713cb

File tree

16 files changed

+72
-74
lines changed

16 files changed

+72
-74
lines changed

src/cgi/wwsympa.fcgi.in

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
1010
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
1111
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
12-
# Copyright 2017, 2018, 2019, 2020, 2021, 2022, 2023 The Sympa Community.
12+
# Copyright 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 The Sympa Community.
1313
# See the AUTHORS.md file at the top-level directory of this distribution
1414
# and at <https://github.com/sympa-community/sympa.git>.
1515
#
@@ -7626,7 +7626,7 @@ sub do_distribute {
76267626
# Don't need to do anything if all messages were filtered out
76277627
# by the "already_moderated" clause above.
76287628
return 'modindex' if (@mail_command == 0);
7629-
7629+
76307630
# Commands are injected into incoming spool directly with "md5"
76317631
# authentication level.
76327632
my $cmd_message = Sympa::Message->new(
@@ -15523,7 +15523,8 @@ sub do_arc_download {
1552315523
my $string = $message->as_string =~ s/\r?\n/\r\n/gr;
1552415524
if ($Archive::Zip::SimpleZip::VERSION) {
1552515525
$rv = $zip->addString($string,
15526-
Name => sprintf('%s/%s.eml', $arc_dirname, $handle->basename)
15526+
Name =>
15527+
sprintf('%s/%s.eml', $arc_dirname, $handle->basename)
1552715528
);
1552815529
$az = $Archive::Zip::SimpleZip::SimpleZipError;
1552915530
} else {
@@ -16680,21 +16681,21 @@ sub do_invite {
1668016681
if ($in{'email'}) {
1668116682
@emails =
1668216683
grep {$_} map { Sympa::Tools::Text::canonic_email($_) }
16683-
split /\0/, $in{'email'};
16684-
$log->syslog('info', 'single invite "%s"', join(' ',@emails));
16684+
split /\0/, $in{'email'};
16685+
$log->syslog('info', 'single invite "%s"', join(' ', @emails));
1668516686
unless (@emails) {
1668616687
add_stash('user', 'no_email');
1668716688
return 'review';
1668816689
}
16689-
} else { # addresses for multiple users (from import.tt2) are $in{dump}
16690+
} else { # addresses for multiple users (from import.tt2) are $in{dump}
1669016691
foreach (split /\r\n|\r|\n/, $in{'dump'}) {
1669116692
next unless /\S/;
1669216693
next if /\A\s*#/; #FIXME: email address can contain '#'
1669316694

1669416695
my ($email) = m{\A\s*(\S+)(?:\s+(.*))?\s*\z};
1669516696
push @emails, $email;
1669616697
}
16697-
$log->syslog('info', 'multiple invite "%s"', join(' ',@emails));
16698+
$log->syslog('info', 'multiple invite "%s"', join(' ', @emails));
1669816699
unless (@emails) {
1669916700
add_stash('user', 'no_email');
1670016701
return 'import';

src/lib/Sympa/CLI/instantiate.pm

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Sympa - SYsteme de Multi-Postage Automatique
55
#
6-
# Copyright 2021, 2022 The Sympa Community. See the
6+
# Copyright 2021, 2022, 2024 The Sympa Community. See the
77
# AUTHORS.md file at the top-level directory of this distribution and at
88
# <https://github.com/sympa-community/sympa.git>.
99
#
@@ -128,9 +128,9 @@ sub instantiate {
128128
} else {
129129
$total = scalar @$list_to_generate;
130130
$progress = Term::ProgressBar->new(
131-
{ name => 'Creating lists',
132-
count => $total,
133-
ETA => 'linear',
131+
{ name => 'Creating lists',
132+
count => $total,
133+
ETA => 'linear',
134134
silent => $options{noout},
135135
}
136136
);

src/lib/Sympa/CLI/user/del.pm

+4-5
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ use constant _args => qw(email);
3838
use constant _need_priv => 1;
3939

4040
sub _run {
41-
my $class = shift;
42-
my $options = shift;
43-
my $email = shift;
41+
my $class = shift;
42+
my $options = shift;
43+
my $email = shift;
4444

4545
my @robots = Sympa::List::get_robots();
4646

@@ -53,8 +53,7 @@ sub _run {
5353
scenario_context => {skip => 1},
5454
);
5555
unless ($spindle and $spindle->spin and $class->_report($spindle)) {
56-
printf STDERR "Failed to delete user %s\n",
57-
$email;
56+
printf STDERR "Failed to delete user %s\n", $email;
5857

5958
exit 1;
6059
}

src/lib/Sympa/Config/Schema.pm

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Sympa - SYsteme de Multi-Postage Automatique
55
#
6-
# Copyright 2020, 2021, 2022, 2023 The Sympa Community. See the
6+
# Copyright 2020, 2021, 2022, 2023, 2024 The Sympa Community. See the
77
# AUTHORS.md file at the top-level directory of this distribution and at
88
# <https://github.com/sympa-community/sympa.git>.
99
#
@@ -500,9 +500,9 @@ our %pinfo = (
500500
not_before => '6.2.73b.1',
501501
},
502502
log_socket_type => {
503-
context => [qw(site)],
504-
obsolete => 'syslog_socket.type',
505-
not_after => '6.2.72',
503+
context => [qw(site)],
504+
obsolete => 'syslog_socket.type',
505+
not_after => '6.2.72',
506506
},
507507
log_level => {
508508
context => [qw(domain site)], #FIXME "domain" possible?

src/lib/Sympa/DataSource/LDAP.pm

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Sympa - SYsteme de Multi-Postage Automatique
55
#
6-
# Copyright 2019, 2020 The Sympa Community. See the AUTHORS.md
6+
# Copyright 2019, 2020, 2024 The Sympa Community. See the AUTHORS.md
77
# file at the top-level directory of this distribution and at
88
# <https://github.com/sympa-community/sympa.git>.
99
#
@@ -46,10 +46,12 @@ sub _open {
4646
$self->{_db} = $db;
4747

4848
my $pagesize = $options{pagesize} || $self->{pagesize};
49-
if ($pagesize and $db->__dbh->root_dse->supported_control(
49+
if ($pagesize
50+
and $db->__dbh->root_dse->supported_control(
5051
Net::LDAP::Constant::LDAP_CONTROL_PAGED()
51-
)) {
52-
$self->{_page} = Net::LDAP::Control::Paged->new( size => $pagesize );
52+
)
53+
) {
54+
$self->{_page} = Net::LDAP::Control::Paged->new(size => $pagesize);
5355
}
5456

5557
my $mesg = $self->_open_operation(%options);
@@ -135,8 +137,7 @@ sub _load_next {
135137
# second page, or later one (but not post-last) of a paged search:
136138
# load next page
137139
$mesg = $self->_open_operation(%options);
138-
}
139-
else {
140+
} else {
140141
$mesg = $self->__dsh;
141142
}
142143
while (my $entry = $mesg->shift_entry) {
@@ -182,10 +183,9 @@ sub _load_next {
182183
}
183184

184185
if ($self->{_page} and $mesg) {
185-
my $cookie = $mesg->control(
186-
Net::LDAP::Constant::LDAP_CONTROL_PAGED
187-
)->cookie;
188-
$self->{_page}->cookie( $cookie );
186+
my $cookie =
187+
$mesg->control(Net::LDAP::Constant::LDAP_CONTROL_PAGED)->cookie;
188+
$self->{_page}->cookie($cookie);
189189
}
190190

191191
return [@retrieved];

src/lib/Sympa/DataSource/List.pm

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Sympa - SYsteme de Multi-Postage Automatique
55
#
6-
# Copyright 2019 The Sympa Community. See the AUTHORS.md file at
6+
# Copyright 2019, 2024 The Sympa Community. See the AUTHORS.md file at
77
# the top-level directory of this distribution and at
88
# <https://github.com/sympa-community/sympa.git>.
99
#
@@ -45,9 +45,11 @@ sub _new {
4545

4646
my $list = $self->{context};
4747
if (ref $list eq 'Sympa::List') {
48-
my $inlist = Sympa::List->new($self->{listname},
48+
my $inlist = Sympa::List->new(
49+
$self->{listname},
4950
($self->{listname} =~ /\@/ ? undef : $list->{'domain'}),
50-
{just_try => 1});
51+
{just_try => 1}
52+
);
5153
$self->{listname} = $inlist->get_id if $inlist;
5254
}
5355

src/lib/Sympa/DatabaseDriver/MySQL.pm

+1-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ sub drop_field {
291291
my $field = shift;
292292

293293
unless (
294-
$self->do_query(q{ALTER TABLE %s DROP COLUMN `%s`}, $table, $field)
295-
) {
294+
$self->do_query(q{ALTER TABLE %s DROP COLUMN `%s`}, $table, $field)) {
296295
$log->syslog('err',
297296
'Could not delete field %s from table %s in database %s',
298297
$field, $table, $self->{'db_name'});

src/lib/Sympa/DatabaseDriver/Oracle.pm

+1-3
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ sub drop_field {
320320
my $table = shift;
321321
my $field = shift;
322322

323-
unless (
324-
$self->do_query(q{ALTER TABLE %s DROP (%s)}, $table, $field)
325-
) {
323+
unless ($self->do_query(q{ALTER TABLE %s DROP (%s)}, $table, $field)) {
326324
$log->syslog('err',
327325
'Could not delete field %s from table %s in database %s',
328326
$field, $table, $self->{'db_name'});

src/lib/Sympa/DatabaseDriver/PostgreSQL.pm

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
99
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
1010
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
11-
# Copyright 2018, 2021, 2023 The Sympa Community. See the
11+
# Copyright 2018, 2021, 2023, 2024 The Sympa Community. See the
1212
# AUTHORS.md file at the top-level directory of this distribution and at
1313
# <https://github.com/sympa-community/sympa.git>.
1414
#
@@ -385,9 +385,8 @@ sub drop_field {
385385
my $table = shift;
386386
my $field = shift;
387387

388-
unless (
389-
$self->do_query(q{ALTER TABLE %s DROP COLUMN %s}, $table, $field)
390-
) {
388+
unless ($self->do_query(q{ALTER TABLE %s DROP COLUMN %s}, $table, $field))
389+
{
391390
$log->syslog('err',
392391
'Could not delete field %s from table %s in database %s',
393392
$field, $table, $self->{'db_name'});

src/lib/Sympa/DatabaseDriver/SQLite.pm

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
88
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
99
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
10-
# Copyright 2018, 2021, 2022, 2023 The Sympa Community. See the
10+
# Copyright 2018, 2021, 2022, 2023, 2024 The Sympa Community. See the
1111
# AUTHORS.md file at the top-level directory of this distribution and at
1212
# <https://github.com/sympa-community/sympa.git>.
1313
#
@@ -330,9 +330,8 @@ sub drop_field {
330330
return $report;
331331
}
332332

333-
unless (
334-
$self->do_query("ALTER TABLE %s DROP COLUMN %s", $table, $field)
335-
) {
333+
unless ($self->do_query("ALTER TABLE %s DROP COLUMN %s", $table, $field))
334+
{
336335
$log->syslog('err',
337336
'Could not delete field %s from table %s in database %s',
338337
$field, $table, $self->{'db_name'});

src/lib/Sympa/Log.pm

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
99
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
1010
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
11-
# Copyright 2017, 2021, 2023 The Sympa Community. See the
11+
# Copyright 2017, 2021, 2023, 2024 The Sympa Community. See the
1212
# AUTHORS.md file at the top-level directory of this distribution and at
1313
# <https://github.com/sympa-community/sympa.git>.
1414
#
@@ -507,7 +507,8 @@ sub get_first_db_log {
507507
if (($select->{'date_from'} // '') =~ /\A$html_date_re\z/) {
508508
my ($yyyy, $mm, $dd) = split /[^\da-z]/i, $select->{'date_from'};
509509

510-
my $date_from = POSIX::mktime(0, 0, -1, $dd + 0, $mm - 1, $yyyy - 1900);
510+
my $date_from =
511+
POSIX::mktime(0, 0, -1, $dd + 0, $mm - 1, $yyyy - 1900);
511512
unless (($select->{'date_to'} // '') =~ /\A$html_date_re\z/) {
512513
my $date_from2 =
513514
POSIX::mktime(0, 0, 25, $dd + 0, $mm - 1, $yyyy - 1900);
@@ -516,7 +517,8 @@ sub get_first_db_log {
516517
} else {
517518
my ($yyyy, $mm, $dd) = split /[^\da-z]/i, $select->{'date_to'};
518519

519-
my $date_to = POSIX::mktime(0, 0, 25, $dd + 0, $mm - 1, $yyyy - 1900);
520+
my $date_to =
521+
POSIX::mktime(0, 0, 25, $dd + 0, $mm - 1, $yyyy - 1900);
520522
$statement .= sprintf "AND date_logs >= %s AND date_logs <= %s ",
521523
$date_from, $date_to;
522524
}

src/lib/Sympa/Request/Handler/add.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ sub _report_user {
178178

179179
if (exists $request->{reception}) {
180180
$reception = $request->{reception};
181-
}
182-
else {
183-
$reception = $list->get_default_user_options(role => $role)->{reception};
181+
} else {
182+
$reception =
183+
$list->get_default_user_options(role => $role)->{reception};
184184
}
185185

186186
# Notify the new list owner/editor

src/lib/Sympa/Request/Handler/del_user.pm

+7-10
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ sub _twist {
4646
my $self = shift;
4747
my $request = shift;
4848

49-
my $robot_id = $request->{context};
50-
my $email = $request->{email};
49+
my $robot_id = $request->{context};
50+
my $email = $request->{email};
5151
my $last_robot = $request->{last_robot};
5252
my @stash;
5353

@@ -60,24 +60,21 @@ sub _twist {
6060
$log->syslog('info', 'List %s', $list->{name});
6161
$list->delete_list_member([$email], exclude => 1);
6262
$self->add_stash($request, 'notice', 'now_unsubscribed',
63-
{email => $email, listname => $list->{'name'}});
63+
{email => $email, listname => $list->{'name'}});
6464
}
6565

6666
# Remove from the editors/owners
6767
for my $role (qw/editor owner/) {
6868
for my $list (Sympa::List::get_which($email, $robot_id, $role)) {
6969
$list->delete_list_admin($role, [$email]);
7070
$self->add_stash($request, 'notice', 'removed',
71-
{'email' => $email, 'listname' => $list->get_id});
71+
{'email' => $email, 'listname' => $list->get_id});
7272
}
7373
}
7474

7575
# Update netidmap_table.
76-
unless (
77-
Sympa::Robot::update_email_netidmap_db(
78-
$robot_id, $email, $email
79-
)
80-
) {
76+
unless (Sympa::Robot::update_email_netidmap_db($robot_id, $email, $email))
77+
{
8178
$self->add_stash($request, 'intern');
8279
$log->syslog('err', 'Update failed');
8380
return undef;
@@ -90,7 +87,7 @@ sub _twist {
9087

9188
$user_object->expire;
9289
$self->add_stash($request, 'notice', 'user_removed',
93-
{'email' => $email, });
90+
{'email' => $email,});
9491
}
9592
}
9693

src/lib/Sympa/Request/Handler/info.pm

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# -*- indent-tabs-mode: nil; -*-
22
# vim:ft=perl:et:sw=4
3-
# $Id$
43

54
# Sympa - SYsteme de Multi-Postage Automatique
65
#
76
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
87
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
98
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
109
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
10+
# Copyright 2024 The Sympa Community. See the
11+
# AUTHORS.md file at the top-level directory of this distribution and at
12+
# <https://github.com/sympa-community/sympa.git>.
1113
#
1214
# This program is free software; you can redistribute it and/or modify
1315
# it under the terms of the GNU General Public License as published by
@@ -89,7 +91,7 @@ sub _twist {
8991
$data->{'url'} = Sympa::get_url($list, 'info');
9092

9193
# Owners and moderators no longer are saved in the config file.
92-
$data->{owner} = [$list->get_admins('owner')];
94+
$data->{owner} = [$list->get_admins('owner')];
9395
$data->{editor} = [$list->get_admins('editor')];
9496

9597
unless (Sympa::send_file($list, 'info_report', $sender, $data)) {

src/lib/Sympa/Scenario.pm

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
88
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
99
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
10-
# Copyright 2017, 2018, 2019, 2020, 2021, 2022 The Sympa Community. See the
11-
# AUTHORS.md file at the top-level directory of this distribution and at
12-
# <https://github.com/sympa-community/sympa.git>.
10+
# Copyright 2017, 2018, 2019, 2020, 2021, 2022, 2024 The Sympa Community.
11+
# See the AUTHORS.md file at the top-level directory of this distribution
12+
# and at <https://github.com/sympa-community/sympa.git>.
1313
#
1414
# This program is free software; you can redistribute it and/or modify
1515
# it under the terms of the GNU General Public License as published by
@@ -1049,8 +1049,11 @@ sub do_verify_netmask {
10491049
}
10501050
}
10511051
unless (@cidr) {
1052-
$log->syslog('err', 'Error rule syntax: failed to parse netmask "%s"',
1053-
$args[0] // '');
1052+
$log->syslog(
1053+
'err',
1054+
'Error rule syntax: failed to parse netmask "%s"',
1055+
$args[0] // ''
1056+
);
10541057
die {};
10551058
}
10561059

0 commit comments

Comments
 (0)