Commit ea2e0f11 authored by olivier.salaun's avatar olivier.salaun
Browse files

[#1085] Fix: standardized the way to refer to a list name in...

[#1085] Fix: standardized the way to refer to a list name in message_report.tt2 and listmaster_notification.tt2. The standard way is [% list.name %]


git-svn-id: https://subversion.renater.fr/sympa/trunk@4763 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent cea47d46
......@@ -14,9 +14,9 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]List "%1" creation request[%END%
[% ELSIF type == 'request_list_renaming' -%]
Subject: [% FILTER qencode %][%|loc(listname)%]List "%1" renaming[%END%][%END%]
Subject: [% FILTER qencode %][%|loc(list.name)%]List "%1" renaming[%END%][%END%]
[%|loc(email,listname,new_listname)%]%1 has renamed list "%2" to "%3"[%END%]
[%|loc(email,list.name,new_listname)%]%1 has renamed list "%2" to "%3"[%END%]
[%|loc%]To activate/delete this mailing list :[%END%]
[% conf.wwsympa_url %]/get_pending_lists
......@@ -159,6 +159,15 @@ Subject: [% FILTER qencode %][%|loc(param0)%]list %1 in status error_config[%END
[%|loc%]Check Sympa log files for more precise information.[%END%]
[% ELSIF type == 'listowner_email_changed' -%]
Subject: [% FILTER qencode %][%|loc(param0)%]List owner/editor email changes[%END%][%END%]
[%|loc(previous_email,new_email)%]User %1 has changed his owner/editor email address to %2. This changed has been performed to the following lists :[%END%]
[% FOREACH updated_list = updated_lists -%]
[% updated_list %]
[% END %]
[% ELSIF type == 'error_copy_file' -%]
Subject: [% FILTER qencode %][%|loc(param0)%]list %1 in status error_config[%END%][%END%]
......@@ -249,7 +258,7 @@ selected by Sympa as severe bouncing addresses:[%END%]
Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server error [%END%][%END%]
[%|loc(who)%] User %1 has encountered an internal server error[%END%]
([%action%][% IF msg_id %] - MSG_ID : [%msg_id%][%END%][% IF cmd %] - COMMAND : [%cmd%][%END%][% IF listname %] - LIST : [%listname%]@[%conf.host%][%END%]) :
([%action%][% IF msg_id %] - MSG_ID : [%msg_id%][%END%][% IF cmd %] - COMMAND : [%cmd%][%END%][% IF list.name %] - LIST : [%list.name%]@[%conf.host%][%END%]) :
[%IF error%][%error%]
[%END%]
......@@ -261,7 +270,7 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server err
Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server error [%END%][%END%]
[%|loc(who)%] User %1 has encountered an internal server error[%END%]
([%|loc%]Web interface[%END%] - ACTION : [%action%][% IF listname %] - LIST : [%listname%]@[%conf.host%][%END%]) :
([%|loc%]Web interface[%END%] - ACTION : [%action%][% IF list.name %] - LIST : [%list.name%]@[%conf.host%][%END%]) :
[%IF error == 'chdir_error' %][%|loc%]Unable to change directory.[%END%]
[%ELSIF error == 'no_authentication_service_name' %][%|loc%]The authentication server name is not defined.[%END%]
......@@ -273,7 +282,7 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server err
[%ELSIF error == 'update_subscriber_db_failed' %][%|loc(sub,old_email)%]Update subscriber '%1' in DB failed[%END%][% IF old_email %][%|loc(old_email)%] (old email : %1)[%END%][%END%]
[%ELSIF error == 'delete_subscriber_db_failed' %][%|loc(sub)%]Delete subscriber '%1' in DB failed.[%END%]
[%ELSIF error == 'delete_email_failed' %][%|loc(old_email)%]Delete user in DB for old email '%1' failed.[%END%]
[%ELSIF error == 'subscriber_not_found' %][%|loc(email,listname)%]Subscriber '%1' is not found in list %2.[%END%]
[%ELSIF error == 'subscriber_not_found' %][%|loc(email,list.name)%]Subscriber '%1' is not found in list %2.[%END%]
[%ELSIF error == 'cannot_read' %][%|loc(filepath)%]Unable to read file : '%1'.[%END%]
[%ELSIF error == 'cannot_write' %][%|loc(filepath)%]Unable to write file : '%1'.[%END%]
[%ELSIF error == 'cannot_open_file' %][%|loc(file)%]Unable to open file '%1'.[%END%]
......@@ -284,43 +293,43 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server err
[%ELSIF error == 'rename_file' %][%|loc(old,new)%]Unable to rename file '%1' into '%2'.[%END%]
[%ELSIF error == 'rename_dir' %][%|loc(old,new)%]Unable to rename directory '%1' into '%2'.[%END%]
[%ELSIF error == 'erase_file' %][%|loc(file)%]Unable to erase file '%1'.[%END%]
[%ELSIF error == 'cannot_send_distribute' %][%|loc(from,listname)%]Unable to send command DISTRIBUTE from '%1' to list '%2'.[%END%]
[%ELSIF error == 'cannot_send_distribute' %][%|loc(from,list.name)%]Unable to send command DISTRIBUTE from '%1' to list '%2'.[%END%]
[%ELSIF error == 'no_html_message_available' %][%|loc(dir)%]No HTML version of the message available in '%1'.[%END%]
[%ELSIF error == 'update_config_changes' %][%|loc(listname)%]Unable to update file config_changes for list '%1'.[%END%]
[%ELSIF error == 'month_not_found' %][%|loc(month,listname)%]Unable to find month '%1' for list '%2'[%END%][%IF dir%][%|loc(dir)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'arc_not_found' %][%|loc(arc_file,listname,path)%]Unable to find archive '%1' for list '%2'[%END%][%IF path%][%|loc(path)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'inaccessible_archive' %][%|loc(listname)%]Unable to find archive for list '%1'[%END%][%IF path%][%|loc(path)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'update_config_changes' %][%|loc(list.name)%]Unable to update file config_changes for list '%1'.[%END%]
[%ELSIF error == 'month_not_found' %][%|loc(month,list.name)%]Unable to find month '%1' for list '%2'[%END%][%IF dir%][%|loc(dir)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'arc_not_found' %][%|loc(arc_file,list.name,path)%]Unable to find archive '%1' for list '%2'[%END%][%IF path%][%|loc(path)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'inaccessible_archive' %][%|loc(list.name)%]Unable to find archive for list '%1'[%END%][%IF path%][%|loc(path)%] : unable to read '%1'.[%END%][%END%]
[%ELSIF error == 'may_not_send_me'%][%|loc()%]Unable to send archive : no message id found.[%END%]
[%ELSIF error == 'archive_not_found'%][%|loc(msgid)%]No message found in archives matching Message-ID '%1'.[%END%]
[%ELSIF error == 'cannot_save_config'%][%|loc(listname)%]Cannot save config file for list '%1'.[%END%]
[%ELSIF error == 'cannot_save_config'%][%|loc(list.name)%]Cannot save config file for list '%1'.[%END%]
[%ELSIF error == 'failed_to_install_aliases'%][%|loc%]Failed to install aliases.[%END%]
[%ELSIF error == 'failed_to_remove_aliases'%][%|loc%]Failed to remove aliases.[%END%]
[%ELSIF error == 'internal_scenario_error_create_list'%][%|loc%]Internal scenario error for 'create_list'.[%END%]
[%ELSIF error == 'create_list'%][%|loc%]Unable to create list.[%END%]
[%ELSIF error == 'unable_to_load_list_of_topics'%][%|loc%]Unable to load list topics.[%END%]
[%ELSIF error == 'unable_to_load_create_list_templates'%][%|loc%]Unable to load create_list templates.[%END%]
[%ELSIF error == 'unable_get_family'%][%|loc(listname)%]Unable to get family for list '%1'.[%END%]
[%ELSIF error == 'list_reload'%][%IF new_listname %][%|loc(new_listname)%]Unable to reload list with new listname '%1'.[%END%][%ELSE%][%|loc%]Unable to reload list[%END%][%END%]
[%ELSIF error == 'sync_include_failed' %][%|loc(listname)%]Failed to inlude members for list '%1'[%END%]
[%ELSIF error == 'sync_include_admin_failed' %][%|loc(listname)%]Failed to include list admins for list '%1'[%END%]
[%ELSIF error == 'unable_get_family'%][%|loc(list.name)%]Unable to get family for list '%1'.[%END%]
[%ELSIF error == 'list_reload'%][%IF new_list.name %][%|loc(new_listname)%]Unable to reload list with new listname '%1'.[%END%][%ELSE%][%|loc%]Unable to reload list[%END%][%END%]
[%ELSIF error == 'sync_include_failed' %][%|loc(list.name)%]Failed to inlude members for list '%1'[%END%]
[%ELSIF error == 'sync_include_admin_failed' %][%|loc(list.name)%]Failed to include list admins for list '%1'[%END%]
[%ELSIF error == 'no_owner_defined' %][%|loc%]No owner is defined for the list '%1'[%END%]
[%ELSIF error == 'exportation_failed' %][%|loc(listname)%]The exportation to an Ldap directory failed for list '%1'[%END%]
[%ELSIF error == 'exportation_failed' %][%|loc(list.name)%]The exportation to an Ldap directory failed for list '%1'[%END%]
[%ELSIF error == 'unable_to_check_list_smtp' %][%|loc(new_listname)%]Unable to check listname '%1' on SMTP server[%END%]
[%ELSIF error == 'create_shared' %][%|loc(listname)%]Cannot create shared for list '%1'.[%END%]
[%ELSIF error == 'restore_shared'%][%|loc(listname)%]Cannot restore shared for list '%1'.[%END%]
[%ELSIF error == 'delete_shared'%][%|loc(listname)%]Cannot delete shared for list '%1'.[%END%]
[%ELSIF error == 'create_shared' %][%|loc(list.name)%]Cannot create shared for list '%1'.[%END%]
[%ELSIF error == 'restore_shared'%][%|loc(list.name)%]Cannot restore shared for list '%1'.[%END%]
[%ELSIF error == 'delete_shared'%][%|loc(list.name)%]Cannot delete shared for list '%1'.[%END%]
[%ELSIF error == 'browse_shared'%][%|loc%]Impossible to browse shared documents for list '%1'.[%END%]
[%ELSIF error == 'cannot_upload'%][%|loc(path)%]Cannot upload file '%1'.[%END%]
[%ELSIF error == 'cannot_unzip' %][%|loc(name)%]Cannot unzip file '%1'.[%END%]
[%ELSIF error == 'error_during_unzip' %][%|loc(name)%]Errors while unzipping file '%1'.[%END%]
[%ELSIF error == 'cannot_send_remind' %][%|loc(from,listname)%]Unable to send command REMIND from '%1' to list '%2'.[%END%]
[%ELSIF error == 'cannot_send_mail' %][%|loc(from,listname)%]Unable to send mail from '%1' to list '%2'.[%END%]
[%ELSIF error == 'auth_msg_failed' %][%|loc(key,listname)%]Unable to access the message authenticated with key '%1' for list '%2'.[%END%]
[%ELSIF error == 'cannot_send_remind' %][%|loc(from,list.name)%]Unable to send command REMIND from '%1' to list '%2'.[%END%]
[%ELSIF error == 'cannot_send_mail' %][%|loc(from,list.name)%]Unable to send mail from '%1' to list '%2'.[%END%]
[%ELSIF error == 'auth_msg_failed' %][%|loc(key,list.name)%]Unable to access the message authenticated with key '%1' for list '%2'.[%END%]
[%ELSIF error == 'del_sub_request' %][%|loc(sub)%]Unable to delete subscription request for user '%1'.[%END%]
[%ELSIF error == 'add_file_zip' %][%|loc(file)%]Unable to add file '%1' to archives.[%END%]
[%ELSIF error == 'write_file_zip' %][%|loc(zipfile)%]Unable to write file zip '%1'.[%END%]
[%ELSIF error == 'err_404' %][%|loc(zipfile)%]File not found.[%END%]
[%ELSIF error == 'new_document_failed' %][%|loc(path,listname)%]Unable to create a SharedDocument with path '%1' for list '%2'.[%END%]
[%ELSIF error == 'new_document_failed' %][%|loc(path,list.name)%]Unable to create a SharedDocument with path '%1' for list '%2'.[%END%]
[%ELSIF error == 'cookie_error' %][%|loc%]Parameter cookie undefined, authentication failure.[%END%]
[%ELSIF error == 'cookie_error_env' %][%|loc(env)%]Cookie error : '%1' undefined, authentication failure.[%END%]
[%ELSIF error%][%error%]
......@@ -332,7 +341,7 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : internal server err
Subject: [% FILTER qencode %][%|loc(list.name)%]Listmaster : system error [%END%][%END%]
[%|loc(who)%] User %1 has encountered a system error[%END%]
([%|loc%]Web interface[%END%] - ACTION : [%action%][% IF listname %] - LIST : [%listname%]@[%conf.host%][%END%]) :
([%|loc%]Web interface[%END%] - ACTION : [%action%][% IF list.name %] - LIST : [%list.name%]@[%conf.host%][%END%]) :
[%IF error == 'a' %]
[%ELSIF error%][% error %]
......
......@@ -58,7 +58,7 @@ was over the maximum size allowed on this list.[%END%]
[%|loc(listname)%]The %1 list could not be created.[%END%]
[% ELSIF entry == 'unfound_message' -%]
[%|loc(listname,key)%]Unable to access the message on list %1 with key %2.
[%|loc(list.name,key)%]Unable to access the message on list %1 with key %2.
Warning : this message may already have been sent by one of the list's editor.[%END%]
[% ELSIF entry == 'unfound_file_message' -%]
......@@ -102,23 +102,23 @@ Content-Transfer-Encoding: 8bit
[% ELSIF entry == 'message_distributed' -%]
[%|loc(key,listname)%]Message %1 for list '%2' has been distributed.[%END%]
[%|loc(key,list.name)%]Message %1 for list '%2' has been distributed.[%END%]
[% ELSIF entry == 'message_in_distribution_spool' -%]
[%|loc(key,listname)%]Message %1 for list '%2' has been validated ; it will be distributed soon.[%END%]
[%|loc(key,list.name)%]Message %1 for list '%2' has been validated ; it will be distributed soon.[%END%]
[% ELSIF entry == 'message_rejected' -%]
[%|loc(key,listname)%]Message %1 for list '%2' has been rejected.[%END%]
[%|loc(key,list.name)%]Message %1 for list '%2' has been rejected.[%END%]
[% ELSIF entry == 'message_confirmed' -%]
[%|loc(key,listname)%]Your message for list '%2' with the %1 ID has been confirmed and distributed.[%END%]
[%|loc(key,list.name)%]Your message for list '%2' with the %1 ID has been confirmed and distributed.[%END%]
[% ELSIF entry == 'message_confirmed_and_in_distribution_spool' -%]
[%|loc(key,listname)%]Your message for list '%2' with the %1 ID has been confirmed ; it will be distributed soon.[%END%]
[%|loc(key,list.name)%]Your message for list '%2' with the %1 ID has been confirmed ; it will be distributed soon.[%END%]
[% END -%]
[% END %]
......
......@@ -616,7 +616,7 @@ sub createList {
## notify listmaster
if ($param->{'create_action'} =~ /notify/) {
if(&List::send_notify_to_listmaster('request_list_creation',$robot,{'listname' => $listname,'email' => $sender})) {
if(&List::send_notify_to_listmaster('request_list_creation',$robot,{'list' => $list,'email' => $sender})) {
&Log::do_log('info','notify listmaster for list creation');
}else{
&Log::do_log('notice',"Unable to send notify 'request_list_creation' to listmaster");
......
......@@ -264,7 +264,7 @@ sub lists {
&List::send_notify_to_listmaster('intern_error',$robot, {'error' => $error,
'who' => $sender,
'cmd' => $cmd_line,
'listname' => $l,
'list' => $list,
'action' => 'Command process'});
next;
}
......@@ -1000,7 +1000,7 @@ sub signoff {
&List::send_notify_to_listmaster('intern_error',$robot, {'error' => $error,
'who' => $sender,
'cmd' => $cmd_line,
'listname' => $l,
'list' => $list,
'action' => 'Command process'});
next;
}
......@@ -1620,7 +1620,7 @@ sub remind {
&List::send_notify_to_listmaster('intern_error',$robot, {'error' => $error,
'who' => $sender,
'cmd' => $cmd_line,
'listname' => $listname,
'list' => $list,
'action' => 'Command process'});
next;
}
......@@ -1864,7 +1864,7 @@ sub set {
&List::send_notify_to_listmaster('intern_error',$robot, {'error' => $error,
'who' => $sender,
'cmd' => $cmd_line,
'listname' => $l,
'list' => $list,
'action' => 'Command process'});
next;
}
......@@ -2042,7 +2042,7 @@ sub distribute {
&do_log('info', 'Message for %s from %s accepted (%d seconds, %d sessions, %d subscribers), message-id=%s, size=%d', $which, $sender, time - $start_time, $numsmtp, $list->get_total(), $hdr->get('Message-Id'), $bytes);
unless ($quiet) {
unless (&report::notice_report_msg('message_distributed',$sender,{'listname' => $which,'key' => $key,'message' => $message},$robot,$list)) {
unless (&report::notice_report_msg('message_distributed',$sender,{'key' => $key,'message' => $message},$robot,$list)) {
&do_log('notice',"Commands::distribute(): Unable to send template 'message_report', entry 'message_distributed' to $sender");
}
}
......@@ -2057,7 +2057,7 @@ sub distribute {
return undef;
}
unless ($quiet) {
&report::notice_report_msg('message_in_distribution_spool',$sender,{'listname' => $which,'key' => $key,'message' => $message},$robot,$list);
&report::notice_report_msg('message_in_distribution_spool',$sender,{'key' => $key,'message' => $message},$robot,$list);
}
&do_log('info', 'Message for %s from %s moved in spool %s for distribution message-id=%s', $name, $sender, $Conf{'queuedistribute'},$hdr->get('Message-Id'));
}
......@@ -2216,7 +2216,7 @@ sub confirm {
}
unless ($quiet || ($action =~ /quiet/i )) {
unless (&report::notice_report_msg('message_confirmed',$sender,{'listname' => $list->{'name'},'key' => $key,'message' => $message},$robot,$list)) {
unless (&report::notice_report_msg('message_confirmed',$sender,{'key' => $key,'message' => $message},$robot,$list)) {
&do_log('notice',"Commands::confirm(): Unable to send template 'message_report', entry 'message_distributed' to $sender");
}
}
......@@ -2230,7 +2230,7 @@ sub confirm {
return undef;
}
unless ($quiet || ($action =~ /quiet/i )) {
&report::notice_report_msg('message_confirmed_and_in_distribution_spool',$sender,{'listname' => $list->{'name'},'key' => $key,'message' => $message},$robot,$list);
&report::notice_report_msg('message_confirmed_and_in_distribution_spool',$sender,{'key' => $key,'message' => $message},$robot,$list);
}
&do_log('info', 'Message for %s from %s moved in spool %s for distribution message-id=%s', $name, $sender, $Conf{'queuedistribute'},$hdr->get('Message-Id'));
......@@ -2305,7 +2305,7 @@ sub reject {
## Open the file
if (!open(IN, $file)) {
&do_log('info', 'REJECT %s %s from %s refused, auth failed', $which, $key, $sender);
&report::reject_report_msg('user','unfound_message',$sender,{'listname' => $name,'key'=> $key},$robot,'',$list);
&report::reject_report_msg('user','unfound_message',$sender,{'key'=> $key},$robot,'',$list);
return 'wrong_auth';
}
......@@ -2334,7 +2334,7 @@ sub reject {
}
## Notify list moderator
unless (&report::notice_report_msg('message_rejected', $sender, {'listname' => $which,'key' => $key,'message' => $msg}, $robot, $list)) {
unless (&report::notice_report_msg('message_rejected', $sender, {'key' => $key,'message' => $msg}, $robot, $list)) {
&do_log('err',"Commands::reject(): Unable to send template 'message_report', entry 'message_rejected' to $sender");
}
......@@ -2499,7 +2499,7 @@ sub which {
&List::send_notify_to_listmaster('intern_error',$robot, {'error' => $error,
'who' => $sender,
'cmd' => $cmd_line,
'listname' => $listname,
'list' => $list,
'action' => 'Command process'});
next;
}
......
......@@ -3824,6 +3824,14 @@ sub send_notify_to_listmaster {
$param->{'to'} = $to;
$param->{'type'} = $operation;
## Prepare list-related data
if ($param->{'list'} && ref($param->{'list'}) eq 'List') {
my $list = $param->{'list'};
$param->{'list'} = {'name' => $list->{'name'},
'host' => $list->{'domain'},
'subject' => $list->{'admin'}{'subject'}};
}
## Automatic action done on bouncing adresses
if ($operation eq 'automatic_bounce_management') {
my $list = new List ($param->{'listname'}, $robot);
......@@ -3844,16 +3852,6 @@ sub send_notify_to_listmaster {
$param->{'db_name'} = &Conf::get_robot_conf($robot, 'db_name');
$options->{'skip_db'} = 1; ## Skip DB access because DB is not accessible
## creation list requested
}elsif ($operation eq 'request_list_creation') {
my $list = new List ($param->{'listname'}, $robot);
unless (defined $list) {
&do_log('err','Parameter %s is not a valid list', $param->{'listname'});
return undef;
}
$param->{'list'} = {'name' => $list->{'name'},
'host' => $list->{'domain'},
'subject' => $list->{'admin'}{'subject'}};
## Loop detected in Sympa
}elsif ($operation eq 'loop_command') {
......
......@@ -108,17 +108,13 @@ sub reject_report_msg {
}
if ($type eq 'intern') {
chomp($param->{'msg_id'});
my $listname;
if (ref($list) ){
$listname = $list->{'name'};
}
$param ||= {};
$param->{'error'} = &gettext($error);
$param->{'who'} = $user;
$param->{'action'} = 'message diffusion';
$param->{'msg_id'} = $param->{'msg_id'};
$param->{'listname'} = $listname;
$param->{'list'} = $list if (defined $list);
unless (&List::send_notify_to_listmaster('mail_intern_error', $robot, $param)) {
&do_log('notice',"report::reject_report_msg(): Unable to notify_listmaster concerning '$user'");
}
......@@ -759,7 +755,7 @@ sub reject_report_web {
my $param = $data;
$param ||= {};
$param->{'error'} = &gettext($error);
$param->{'listname'} = $listname;
$param->{'list'} = $list if (defined $list);
$param->{'who'} = $user;
$param->{'action'} ||= 'Command process';
......
......@@ -7916,10 +7916,11 @@ Creates a list using a list template
}
 
## notify listmaster
my $list = new List $in{'listname'};
if ($param->{'create_action'} =~ /notify/) {
&wwslog('info','notify listmaster');
unless (&List::send_notify_to_listmaster('request_list_creation',$robot,
{'listname' => $in{'listname'},
{'list' => $list,
'email' => $param->{'user'}{'email'}})) {
&wwslog('notice',"Unable to send notify 'request_list_creation' to listmaster");
}
......@@ -9924,7 +9925,7 @@ sub _restrict_values {
if ($r_action =~ /listmaster/) {
$list->{'admin'}{'status'} = 'pending' ;
&List::send_notify_to_listmaster('request_list_renaming',$robot,
{'listname' => $list->{'name'},
{'list' => $list,
'new_listname' => $in{'new_listname'},
'email' => $param->{'user'}{'email'}});
&report::notice_report_web('pending_list',{},$param->{'action'},$list);
......@@ -14867,7 +14868,7 @@ sub do_delete_pictures {
return undef;
}
 
## Change email
## Change email as list MEMBER
foreach my $list ( &List::get_which($param->{'user'}{'email'},$robot, 'member') ) {
my $l = $list->{'name'};
......@@ -14932,6 +14933,33 @@ sub do_delete_pictures {
&report::notice_report_web('performed',{},$param->{'action'});
## Change email as list OWNER/MODERATOR
my %updated_lists;
foreach my $role ('owner', 'editor') {
foreach my $list ( &List::get_which($param->{'user'}{'email'},$robot, $role) ) {
## Go through owners/editors of the list
foreach my $admin (@{$list->{'admin'}{$role}}) {
next unless ($admin->{'email'} eq $param->{'user'}{'email'});
## Update entry with new email address
$admin->{'email'} = $in{'email'};
&wwslog('notice', "Updated %s in list %s ;new email to '%s'", $role, $list->{'name'}, $in{'email'});
$updated_lists{$list->{'name'}}++;
}
## Update Db cache for the list
$list->sync_include_admin();
$list->save_config();
}
}
## Notify listmasters that list owners/moderators email have changed
&List::send_notify_to_listmaster('listowner_email_changed',$robot,
{'list' => $list,
'previous_email' => $param->{'user'}{'email'},
'new_email' => $in{'email'},
'updated_lists' => keys %updated_lists})
## Update User_table
&List::delete_user_db($in{'email'});
 
......
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