diff options
author | Mark Sapiro <mark@msapiro.net> | 2010-03-06 13:03:24 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2010-03-06 13:03:24 -0800 |
commit | 7a1e07a9289a8bba9cf5a7749ab2a36e70ce9708 (patch) | |
tree | 7b272167e19f0411b0c16a9c1b85cd170eb6fc3a /Mailman | |
parent | 7ab4c486f8bb1df6650df0cdb0aac8506ea8d450 (diff) | |
download | mailman2-7a1e07a9289a8bba9cf5a7749ab2a36e70ce9708.tar.gz mailman2-7a1e07a9289a8bba9cf5a7749ab2a36e70ce9708.tar.xz mailman2-7a1e07a9289a8bba9cf5a7749ab2a36e70ce9708.zip |
Fixed a bug in the admindb interface that could apply a moderator
action to a message not displayed. Bug #533468.
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Cgi/admindb.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index ac4690b1..e6d9c99e 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -507,6 +507,7 @@ def show_helds_overview(mlist, form): if when: t.AddRow([' ', Bold(_('Received:')), time.ctime(when)]) + t.AddRow([InputObj(qsender, 'hidden', str(id), False).Format()]) counter += 1 right.AddRow([t]) stable.AddRow([left, right]) @@ -684,9 +685,13 @@ def process_form(mlist, doc, cgidata): 'senderclearmodp-', 'senderbanp-'): if k.startswith(prefix): action = k[:len(prefix)-1] - sender = unquote_plus(k[len(prefix):]) + qsender = k[len(prefix):] + sender = unquote_plus(qsender) value = cgidata.getvalue(k) senderactions.setdefault(sender, {})[action] = value + for id in cgidata.getlist(qsender): + senderactions[sender].setdefault('message_ids', + []).append(int(id)) # discard-all-defers try: discardalldefersp = cgidata.getvalue('discardalldefersp', 0) @@ -708,6 +713,9 @@ def process_form(mlist, doc, cgidata): forwardaddr = actions.get('senderforwardto', '') bysender = helds_by_sender(mlist) for id in bysender.get(sender, []): + if id not in senderactions[sender]['message_ids']: + # It arrived after the page was displayed. Skip it. + continue try: msgdata = mlist.GetRecord(id)[5] comment = msgdata.get('rejection_notice', |