Update of /cvsroot/mailman/mailman/Mailman
In directory usw-pr-cvs1:/tmp/cvs-serv19766

Modified Files:
        Utils.py 
Log Message:
is_administrivia(): Do the same test on the Subject: field that we do
on body lines.  Also, add `confirm' as an administrivia test.  Closes
SF bug #454857.


Index: Utils.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Utils.py,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -d -r2.28 -r2.29
*** Utils.py    5 Mar 2002 16:20:15 -0000       2.28
--- Utils.py    5 Apr 2002 23:53:39 -0000       2.29
***************
*** 520,533 ****
  ADMINDATA = {
      # admin keyword: (minimum #args, maximum #args)
!     'subscribe':   (0, 3),
!     'unsubscribe': (0, 1),
!     'who':         (0, 0),
      'info':        (0, 0),
      'lists':       (0, 0),
-     'set':         (3, 3),
-     'help':        (0, 0),
-     'password':    (2, 2),
      'options':     (0, 0),
      'remove':      (0, 0),
      }
  
--- 520,534 ----
  ADMINDATA = {
      # admin keyword: (minimum #args, maximum #args)
!     'confirm':     (1, 1),
!     'help':        (0, 0),
      'info':        (0, 0),
      'lists':       (0, 0),
      'options':     (0, 0),
+     'password':    (2, 2),
      'remove':      (0, 0),
+     'set':         (3, 3),
+     'subscribe':   (0, 3),
+     'unsubscribe': (0, 1),
+     'who':         (0, 0),
      }
  
***************
*** 551,560 ****
      if ADMINDATA.has_key(bodytext.strip().lower()):
          return 1
-     # See if the subect has only one word, and that word is administrivia
-     if ADMINDATA.has_key(msg.get('subject', '').strip().lower()):
-         return 1
      # Look at the first N lines and see if there is any administrivia on the
      # line.  BAW: N is currently hardcoded to 5.
!     for line in lines[:5]:
          if not line.strip():
              continue
--- 552,558 ----
      if ADMINDATA.has_key(bodytext.strip().lower()):
          return 1
      # Look at the first N lines and see if there is any administrivia on the
      # line.  BAW: N is currently hardcoded to 5.
!     for line in lines[:5] + [msg.get('subject', '')]:
          if not line.strip():
              continue



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to