aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-06-11 19:29:33 -0700
committerMark Sapiro <mark@msapiro.net>2018-06-11 19:29:33 -0700
commitd2da11a73ee15a4e467fdacbb0f5c36447b144f6 (patch)
tree425420bec1af90b4d2d764c398cc35e742d6f93f
parentd363c183a208a1ef34847656533cb818d7a7cf50 (diff)
parent4c54a401f9070bcb385a44bbaec8c08facb10ee4 (diff)
downloadmailman2-d2da11a73ee15a4e467fdacbb0f5c36447b144f6.tar.gz
mailman2-d2da11a73ee15a4e467fdacbb0f5c36447b144f6.tar.xz
mailman2-d2da11a73ee15a4e467fdacbb0f5c36447b144f6.zip
Added %(whence)s replacement for admin (un)subscribe notices.
-rwxr-xr-xMailman/MailList.py2
-rw-r--r--NEWS5
-rw-r--r--templates/en/adminsubscribeack.txt2
-rw-r--r--templates/en/adminunsubscribeack.txt1
4 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index fdc3802a..7cd86bf7 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1069,6 +1069,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
"adminsubscribeack.txt",
{"listname" : realname,
"member" : formataddr((name, email)),
+ "whence" : "" if whence is None else "(" + whence + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
@@ -1105,6 +1106,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
'adminunsubscribeack.txt',
{'member' : name,
'listname': self.real_name,
+ "whence" : "" if whence is None else "(" + whence + ")"
}, mlist=self)
msg = Message.OwnerNotification(self, subject, text)
msg.send(self)
diff --git a/NEWS b/NEWS
index cb0dcc5d..149c9838 100644
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,11 @@ Here is a history of user visible changes to Mailman.
'mischief' log entries for 'hostile listname' noe include the remote IP
if available.
+ - Thanks to Jim Popovitch, admin notices of (un)subscribes now may give
+ the source of the action. This consists of a %(whence)s replacement
+ that can be added to the admin(un)subscribeack.txt templates. This
+ has been done for the 'en' templates, but not for most others.
+
i18n
- The Japanese translation has been updated by Yasuhito FUTATSUKI.
diff --git a/templates/en/adminsubscribeack.txt b/templates/en/adminsubscribeack.txt
index 388a3a24..2c83f5c8 100644
--- a/templates/en/adminsubscribeack.txt
+++ b/templates/en/adminsubscribeack.txt
@@ -1,3 +1,3 @@
%(member)s has been successfully subscribed to %(listname)s.
-
+%(whence)s
diff --git a/templates/en/adminunsubscribeack.txt b/templates/en/adminunsubscribeack.txt
index 2ebcfeb7..bbfcd430 100644
--- a/templates/en/adminunsubscribeack.txt
+++ b/templates/en/adminunsubscribeack.txt
@@ -1,2 +1,3 @@
%(member)s has been removed from %(listname)s.
+%(whence)s