Commit 8a722611 authored by olivier.salaun's avatar olivier.salaun
Browse files

[feature] [#713] Now notifying new list owners/moderators.


git-svn-id: https://subversion.renater.fr/sympa/trunk@5090 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 41aca5d7
......@@ -23,6 +23,19 @@ Deleted topic(s) is(are) :[%END%]
%1[% END %]
[% ELSIF type == 'added_as_listadmin' -%]
Subject: [% FILTER qencode %][%|loc(list.name)%]Management of list %1[%END%][%END%]
[% IF admin_type == 'owner' %]
[%|loc(delegator,list.name,list.host)%]You have been delegate the responsability of list owner by %1 for list %2@%3.[%END%]
[% ELSE %]
[%|loc(delegator,list.name,list.host)%]You have been delegate the responsability of list moderator by %1 for list %2@%3.[%END%]
[% END %]
[%|loc(conf.wwsympa_url,list.name)%]The list homepage: %1/info/%2[%END%]
[%|loc(conf.wwsympa_url)%]Owner and moderator guide: %1/help/admin[%END%]
[% ELSE -%]
Subject: [% FILTER qencode %][%list.name%] / [%type%][%END%]
......
......@@ -81,6 +81,9 @@
[% ELSIF notice.msg == 'listname_lowercased' %]
[%|loc%]List name has been lowercased[%END%]
[% ELSIF notice.msg == 'user_notified' %]
[%|loc(notice.notified_user)%]User %1 has been notified[%END%]
[% ELSE %]
[% notice.msg %]
......
......@@ -8732,6 +8732,27 @@ sub do_edit_list {
my @users;
## If new owners/editors have been added, then notify them
foreach my $admin_type ('owner','editor') {
my (%previous_emails, %new_emails);
## Check previous entries
foreach my $entry (@{$list->{'admin'}{$admin_type}}) {
$previous_emails{$entry->{'email'}} = 1;
}
## Compare with new entries
foreach my $entry (@{$new_admin->{$admin_type}}) {
unless ($previous_emails{$entry->{'email'}}) {
## Notify the new list owner/editor
$list->send_notify_to_user('added_as_listadmin', $entry->{'email'},{'admin_type' => $admin_type, 'delegator' => $param->{'user'}{'email'}});
&report::notice_report_web('user_notified',{'notified_user' => $entry->{'email'}},$param->{'action'});
}
}
}
if (defined $check_family{$pname}) { # $pname is CONTROLLED
&_check_new_values(\%check_family,$pname,$new_admin);
}
......
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