diff options
author | bwarsaw <> | 2004-04-25 00:18:57 +0000 |
---|---|---|
committer | bwarsaw <> | 2004-04-25 00:18:57 +0000 |
commit | 0620ba733dcdb1327ce5a9b092bc1b9ef078214f (patch) | |
tree | 0aa8a6c689fdfafebfcdb2d89fb4777ce49c59b1 /Mailman/Cgi/admindb.py | |
parent | 562aa6c5dadd2245671275bd84153b26b1ed264b (diff) | |
download | mailman2-0620ba733dcdb1327ce5a9b092bc1b9ef078214f.tar.gz mailman2-0620ba733dcdb1327ce5a9b092bc1b9ef078214f.tar.xz mailman2-0620ba733dcdb1327ce5a9b092bc1b9ef078214f.zip |
main(), process_form(): Due to popular demand, added SF patch # 810675 which
adds a "discard all messages marked Defer" for quicker admindb maintenance.
Patch by Eddie Kohler, SF id xexd.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Cgi/admindb.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index ab8c2af0..3a4a1ebb 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2004 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 @@ -189,6 +189,11 @@ def main(): + ' <em>%s</em>' % mlist.real_name)) if not details: form.AddItem(Center(SubmitButton('submit', _('Submit All Data')))) + form.AddItem(Center( + CheckBox('discardalldefersp', 0).Format() + + ' ' + + _('Discard all messages marked <em>Defer</em>') + )) # Add a link back to the overview, if we're not viewing the overview! adminurl = mlist.GetScriptURL('admin', absolute=1) d = {'listname' : mlist.real_name, @@ -674,6 +679,11 @@ def process_form(mlist, doc, cgidata): sender = unquote_plus(k[len(prefix):]) value = cgidata.getvalue(k) senderactions.setdefault(sender, {})[action] = value + # discard-all-defers + try: + discardalldefersp = cgidata.getvalue('discardalldefersp', 0) + except ValueError: + discardalldefersp = 0 for sender in senderactions.keys(): actions = senderactions[sender] # Handle what to do about all this sender's held messages @@ -681,6 +691,8 @@ def process_form(mlist, doc, cgidata): action = int(actions.get('senderaction', mm_cfg.DEFER)) except ValueError: action = mm_cfg.DEFER + if action == mm_cfg.DEFER and discardalldefersp: + action = mm_cfg.DISCARD if action in (mm_cfg.DEFER, mm_cfg.APPROVE, mm_cfg.REJECT, mm_cfg.DISCARD): preserve = actions.get('senderpreserve', 0) |