Update of /cvsroot/mailman/mailman/Mailman/Cgi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21351

Modified Files:
      Tag: Release_2_1-maint
        admindb.py 
Log Message:
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.


Index: admindb.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Cgi/admindb.py,v
retrieving revision 2.45.2.5
retrieving revision 2.45.2.6
diff -u -d -r2.45.2.5 -r2.45.2.6
--- admindb.py  27 Dec 2003 07:45:26 -0000      2.45.2.5
+++ admindb.py  25 Apr 2004 00:18:57 -0000      2.45.2.6
@@ -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 @@
                 + ' <em>%s</em>' % mlist.real_name))
         if not details:
             form.AddItem(Center(SubmitButton('submit', _('Submit All Data'))))
+        form.AddItem(Center(
+            CheckBox('discardalldefersp', 0).Format() +
+            '&nbsp;' +
+            _('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 @@
                 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 @@
             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)


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to