Commit 7939af0f authored by sikeda's avatar sikeda
Browse files

[-bug] When an instance of family is closed, notification sent to owner is hard to read.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12413 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent aa6bb6b7
......@@ -20,10 +20,10 @@ Subject: [% FILTER qencode %][%|loc(list.name,rate)%]List "%1" warning: archive
[%|loc(conf.host,conf.listmaster_email)%]Messages are still archived but you should contact %2@%1[%END%].
[% ELSIF type == 'closed_during_instantiation_family' -%]
[% ELSIF type == 'list_closed_family' -%]
Subject: [% FILTER qencode %][%|loc(list.name)%]List %1 is closed[%END%][%END%]
[%|loc(list.name,list.host,param0)%]%1@%2 is no longer an instance of family %3.
[%|loc(list.name,list.host,list.family.name)%]%1@%2 is no longer an instance of family %3.
This list has been closed.[%END%]
[% ELSIF type == 'warn-signoff' -%]
......
......@@ -682,22 +682,24 @@ sub set_status_error_config {
## set the list in status family_closed and send a notify to owners
sub set_status_family_closed {
my ($self, $message, @param) = @_;
$log->syslog('debug2', '');
$log->syslog('debug2', '(%s, %s, %s)', @_);
my $self = shift;
my $message = shift; # 'close_list', 'purge_list': Currently unused.
my @param = @_; # No longer used.
unless ($self->{'admin'}{'status'} eq 'family_closed') {
my $updater =
Conf::get_robot_conf($self->{'domain'}, 'listmaster_email') . '@'
. Conf::get_robot_conf($self->{'domain'}, 'host');
my $host = Conf::get_robot_conf($self->{'domain'}, 'host');
unless ($self->close_list("listmaster\@$host", 'family_closed')) {
unless ($self->close_list($updater, 'family_closed')) {
$log->syslog('err',
'Impossible to set the list %s in status family_closed');
return undef;
}
$log->syslog('info', 'The list "%s" is set in status family_closed',
$self->{'name'});
$self->send_notify_to_owner($message, \@param);
# messages : close_list
$self->send_notify_to_owner('list_closed_family', {});
}
return 1;
}
......
......@@ -407,6 +407,8 @@ sub new_from_template {
$data->{'list'}{'subject'} = $list->{'admin'}{'subject'};
$data->{'list'}{'owner'} = [$list->get_admins('owner')];
$data->{'list'}{'dir'} = $list->{'dir'}; #FIXME: Required?
$data->{'list'}{'family'} = {name => $list->get_family->{'name'}}
if $list->get_family;
}
# Sign mode
......
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