aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2017-06-09 14:49:45 -0700
committerMark Sapiro <mark@msapiro.net>2017-06-09 14:49:45 -0700
commitcb1005561f03c223dd592af19d5dfe129d2a62e5 (patch)
treec164feb03177de8a2c87bab814b25b9b8d69a673
parent758366326759643af4f2e6cd48736112ff1cba88 (diff)
downloadmailman2-cb1005561f03c223dd592af19d5dfe129d2a62e5.tar.gz
mailman2-cb1005561f03c223dd592af19d5dfe129d2a62e5.tar.xz
mailman2-cb1005561f03c223dd592af19d5dfe129d2a62e5.zip
Display date of held subscriptions and keep newest.
Diffstat (limited to '')
-rw-r--r--Mailman/Cgi/admindb.py17
-rw-r--r--NEWS5
2 files changed, 16 insertions, 6 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py
index d2549379..855c2e04 100644
--- a/Mailman/Cgi/admindb.py
+++ b/Mailman/Cgi/admindb.py
@@ -366,7 +366,7 @@ def show_pending_subs(mlist, form):
form.AddItem('<hr>')
form.AddItem(Center(Header(2, _('Subscription Requests'))))
table = Table(border=2)
- table.AddRow([Center(Bold(_('Address/name'))),
+ table.AddRow([Center(Bold(_('Address/name/time'))),
Center(Bold(_('Your decision'))),
Center(Bold(_('Reason for refusal')))
])
@@ -379,12 +379,14 @@ def show_pending_subs(mlist, form):
addrs.sort()
num = 0
for addr, ids in addrs:
- # Eliminate duplicates
- for id in ids[1:]:
+ # Eliminate duplicates.
+ # The list ws returned sorted ascending. Keep the last.
+ for id in ids[:-1]:
mlist.HandleRequest(id, mm_cfg.DISCARD)
- id = ids[0]
- time, addr, fullname, passwd, digest, lang = mlist.GetRecord(id)
+ id = ids[-1]
+ stime, addr, fullname, passwd, digest, lang = mlist.GetRecord(id)
fullname = Utils.uncanonstr(fullname, mlist.preferred_language)
+ displaytime = time.ctime(stime)
radio = RadioButtonArray(id, (_('Defer'),
_('Approve'),
_('Reject'),
@@ -401,7 +403,9 @@ def show_pending_subs(mlist, form):
'</label>')
# While the address may be a unicode, it must be ascii
paddr = addr.encode('us-ascii', 'replace')
- table.AddRow(['%s<br><em>%s</em>' % (paddr, Utils.websafe(fullname)),
+ table.AddRow(['%s<br><em>%s</em><br>%s' % (paddr,
+ Utils.websafe(fullname),
+ displaytime),
radio,
TextBox('comment-%d' % id, size=40)
])
@@ -433,6 +437,7 @@ def show_pending_unsubs(mlist, form):
num = 0
for addr, ids in addrs:
# Eliminate duplicates
+ # Here the order doesn't matter as the data is just the address.
for id in ids[1:]:
mlist.HandleRequest(id, mm_cfg.DISCARD)
id = ids[0]
diff --git a/NEWS b/NEWS
index ee6e8449..82df3f05 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,11 @@ Here is a history of user visible changes to Mailman.
2.1.25 (xx-xxx-xxxx)
+ New Features
+
+ - The admindb held subscriptions listing now includes the date of the
+ most recent request from the address. (LP: #1697097)
+
Bug fixes and other patches
- Fixed MTA/Postfix.py to ensure that created aliases(.db) and