Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When owners/moderators are added, "N subscribers added" is shown #1584

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion default/mail_tt2/report.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,13 @@
[%~ END %]

[%~ ELSIF report_entry == 'add_performed' ~%]
[%|loc(report_param.total)%]%1 subscribers added[%END%]
[% IF report_param.role == 'owner' ~%]
[%|loc(report_param.total)%]%1 owners added[%END%]
[%~ ELSIF report_param.role == 'editor' ~%]
[%|loc(report_param.total)%]%1 moderators added[%END%]
[%~ ELSE ~%]
[%|loc(report_param.total)%]%1 subscribers added[%END%]
[%~ END %]

[%~ ELSIF report_entry == 'updated_info' ~%]
[%|loc(report_param.email,report_param.listname)%]Information regarding user %1 has been updated for list %2.[%END%]
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Sympa/List.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3325,7 +3325,8 @@ sub add_list_admin {

$self->_cache_publish_expiry('admin_user') if $total;

push @$stash_ref, ['notice', 'add_performed', {total => $total}]
push @$stash_ref,
['notice', 'add_performed', {total => $total, role => $role}]
if $total;
return $total;
}
Expand Down