diff options
author | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
---|---|---|
committer | David Planella <david.planella@gmail.com> | 2009-01-29 00:22:52 +0100 |
commit | 518b3843c0117f24b1b277a724169fb616604e4d (patch) | |
tree | 01ab5cbe392ff3a8e851dae1be4eb3a8cf8ed439 /Mailman/Cgi/admindb.py | |
parent | 42fcf522d7818e9e1ee922d1a68824b0f6dcc83d (diff) | |
parent | c0da6af58657b1fe5730d3dea0e78bc17dac490a (diff) | |
download | mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.gz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.tar.xz mailman2-518b3843c0117f24b1b277a724169fb616604e4d.zip |
Merged from upstream
Diffstat (limited to 'Mailman/Cgi/admindb.py')
-rw-r--r-- | Mailman/Cgi/admindb.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index 75cc66a0..a20763f1 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2009 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 @@ -554,12 +554,8 @@ def show_detailed_requests(mlist, form): def show_post_requests(mlist, id, info, total, count, form): - # For backwards compatibility with pre 2.0beta3 - if len(info) == 5: - ptime, sender, subject, reason, filename = info - msgdata = {} - else: - ptime, sender, subject, reason, filename, msgdata = info + # Mailman.ListAdmin.__handlepost no longer tests for pre 2.0beta3 + ptime, sender, subject, reason, filename, msgdata = info form.AddItem('<hr>') # Header shown on each held posting (including count of total) msg = _('Posting Held for Approval') @@ -709,10 +705,12 @@ def process_form(mlist, doc, cgidata): preserve = actions.get('senderpreserve', 0) forward = actions.get('senderforward', 0) forwardaddr = actions.get('senderforwardto', '') - comment = _('No reason given') bysender = helds_by_sender(mlist) for id in bysender.get(sender, []): try: + msgdata = mlist.GetRecord(id)[5] + comment = msgdata.get('rejection_notice', + _('[No explanation given]')) mlist.HandleRequest(id, action, comment, preserve, forward, forwardaddr) except (KeyError, Errors.LostHeldMessage): @@ -771,7 +769,8 @@ def process_form(mlist, doc, cgidata): forwardaddrkey = 'forward-addr-%d' % request_id bankey = 'ban-%d' % request_id # Defaults - comment = _('[No reason given]') + msgdata = mlist.GetRecord(request_id)[5] + comment = msgdata.get('rejection_notice', _('[No explanation given]')) preserve = 0 forward = 0 forwardaddr = '' |